source: trunk/SRC/Documentation/idldoc_assistant_output/Interpolation/spl_incr.html @ 234

Last change on this file since 234 was 234, checked in by pinsard, 17 years ago

new idldoc html and assistant outputs

File size: 10.1 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>spl_incr.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="spl_fstdrv.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href="spl_keep_mean.html"><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Interpolation/</font></h1>
58    <h2>spl_incr.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64
65 Given the arrays X and Y, which tabulate a function (with the X[i]
66 AND Y[i] in ascending order), and given an input value X2, the
67 SPL_INCR function returns an interpolated value for the given values
68 of X2. The interpolation method is based on cubic spline, corrected
69 in a way that interpolated values are also monotonically increasing.
70
71
72   
73    <h2>Routine summary</h2>
74
75    <dl>
76     
77      <dt><a href="#_pure_concave"><i>result = </i>pure_concave(<i>x1, x2, y1, y2, der2, x</i>)</a><dt>
78      <dd><font size="-1"> </font></dd>
79     
80      <dt><a href="#_pure_convex"><i>result = </i>pure_convex(<i>x1, x2, y1, y2, der2, x</i>)</a><dt>
81      <dd><font size="-1"></font></dd>
82     
83      <dt><a href="#_spl_incr"><i>result = </i>spl_incr(<i>x, y, x2</i>, YP0=<i>YP0</i>, YPN_1=<i>YPN_1</i>)</a><dt>
84      <dd><font size="-1"></font></dd>
85     
86    </dl>
87
88    <p>&nbsp;</p>
89   
90
91     
92      <a name="#_pure_concave"></a>
93
94      <h2>pure_concave  </h2>
95
96      <p><font face="Courier"><i>result = </i>pure_concave(<i><a href="#_pure_concave_keyword_x1">x1</a>, <a href="#_pure_concave_keyword_x2">x2</a>, <a href="#_pure_concave_keyword_y1">y1</a>, <a href="#_pure_concave_keyword_y2">y2</a>, <a href="#_pure_concave_keyword_der2">der2</a>, <a href="#_pure_concave_keyword_x">x</a></i>)</font></p>
97
98   
99
100
101    <h3>Return value</h3>
102
103    y2: f(x2) = y2. Double precision array
104
105
106   
107    <h3>Parameters</h3>
108   
109
110    <a name="#_pure_concave_keyword_x1"></a>
111    <h4>x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
112      <font size="-1" color="#006633">in</font>
113     
114     
115      <font size="-1" color="#006633">required</font>
116     
117     
118     
119     
120    </h4>
121
122   
123 An n-element (at least 2) input vector that specifies the tabulate points in
124 a strict ascending order.
125
126   
127
128    <a name="#_pure_concave_keyword_x2"></a>
129    <h4>x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
130      <font size="-1" color="#006633">in</font>
131     
132     
133      <font size="-1" color="#006633">required</font>
134     
135     
136     
137     
138    </h4>
139
140   
141 The input values for which the interpolated values are
142 desired. Its values must be strictly monotonically increasing.
143
144   
145
146    <a name="#_pure_concave_keyword_y1"></a>
147    <h4>y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
148      <font size="-1" color="#006633">in</font>
149     
150     
151      <font size="-1" color="#006633">required</font>
152     
153     
154     
155     
156    </h4>
157
158   
159 f(x) = y. An n-element input vector that specifies the values
160 of the tabulated function F(Xi) corresponding to Xi. As f is
161 supposed to be monotonically increasing, y values must be
162 monotonically increasing. y can have equal consecutive values.
163
164   
165
166    <a name="#_pure_concave_keyword_y2"></a>
167    <h4>y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
168     
169     
170     
171     
172     
173     
174     
175     
176    </h4>
177
178   
179   
180
181    <a name="#_pure_concave_keyword_der2"></a>
182    <h4>der2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
183     
184     
185     
186     
187     
188     
189     
190     
191    </h4>
192
193   
194
195   
196
197    <a name="#_pure_concave_keyword_x"></a>
198    <h4>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
199     
200     
201     
202     
203     
204     
205     
206     
207    </h4>
208
209   
210
211   
212   
213
214   
215
216    <h3>Examples</h3><pre>
217
218 IDL> n = 100L
219 IDL> x = (dindgen(n))^2
220 IDL> y = abs(randomn(0, n))
221 IDL> y[n/2:n/2+1] = 0.
222 IDL> y[n-n/3] = 0.
223 IDL> y[n-n/6:n-n/6+5] = 0.
224 IDL> y = total(y, /cumulative, /double)
225 IDL> x2 = dindgen((n-1)^2)
226 IDL> n2 = n_elements(x2)
227 IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0
228 IDL> y2 = spl_incr( x, y, x2)
229 IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land
230 IDL> oplot, x2, y2, color = 100
231 IDL> c = y2[1:n2-1] - y2[0:n2-2]
232 IDL> print, min(c) LT 0
233 IDL> print, min(c, max = ma), ma
234 IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase
235 IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1
236
237    </pre><h3>Version history</h3>
238   
239    <h4>Version</h4>
240 $Id: spl_incr.pro 231 2007-03-19 17:15:51Z pinsard $
241
242    <h4>History</h4>
243  Sebastien Masson (smasson@lodyc.jussieu.fr): May-Dec 2005
244
245   
246
247    <h3>Known issues</h3>
248   
249   
250   
251    <h4>Restrictions</h4>
252 It might be possible that y2[i+1]-y2[i] has very small negative
253 values (amplitude smaller than 1.e-6)...
254
255
256   
257   
258   
259   
260   
261   
262   
263
264    <font size="-3"><p>&nbsp;</p></font>
265    <hr size="1" color="#CCCCCC"/>
266     
267      <a name="#_pure_convex"></a>
268
269      <h2>pure_convex  </h2>
270
271      <p><font face="Courier"><i>result = </i>pure_convex(<i><a href="#_pure_convex_keyword_x1">x1</a>, <a href="#_pure_convex_keyword_x2">x2</a>, <a href="#_pure_convex_keyword_y1">y1</a>, <a href="#_pure_convex_keyword_y2">y2</a>, <a href="#_pure_convex_keyword_der2">der2</a>, <a href="#_pure_convex_keyword_x">x</a></i>)</font></p>
272
273   
274
275   
276
277   
278    <h3>Parameters</h3>
279   
280
281    <a name="#_pure_convex_keyword_x1"></a>
282    <h4>x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
283      <font size="-1" color="#006633">in</font>
284     
285     
286      <font size="-1" color="#006633">required</font>
287     
288     
289     
290     
291    </h4>
292
293   
294 An n-element (at least 2) input vector that specifies the tabulate points in
295 a strict ascending order.
296
297   
298
299    <a name="#_pure_convex_keyword_x2"></a>
300    <h4>x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
301      <font size="-1" color="#006633">in</font>
302     
303     
304      <font size="-1" color="#006633">required</font>
305     
306     
307     
308     
309    </h4>
310
311   
312 The input values for which the interpolated values are
313 desired. Its values must be strictly monotonically increasing.
314
315   
316
317    <a name="#_pure_convex_keyword_y1"></a>
318    <h4>y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
319      <font size="-1" color="#006633">in</font>
320     
321     
322      <font size="-1" color="#006633">required</font>
323     
324     
325     
326     
327    </h4>
328
329   
330 f(x) = y. An n-element input vector that specifies the values
331    of the tabulated function F(Xi) corresponding to Xi. As f is
332    supposed to be monotonically increasing, y values must be
333    monotonically increasing. y can have equal consecutive values.
334
335   
336
337    <a name="#_pure_convex_keyword_y2"></a>
338    <h4>y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
339     
340     
341     
342     
343     
344     
345     
346     
347    </h4>
348
349   
350   
351
352    <a name="#_pure_convex_keyword_der2"></a>
353    <h4>der2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
354     
355     
356     
357     
358     
359     
360     
361     
362    </h4>
363
364   
365   
366
367    <a name="#_pure_convex_keyword_x"></a>
368    <h4>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
369     
370     
371     
372     
373     
374     
375     
376     
377    </h4>
378
379   
380
381   
382   
383
384   
385
386   
387   
388   
389   
390   
391   
392
393   
394   
395   
396   
397   
398
399   
400   
401   
402   
403   
404   
405   
406
407    <font size="-3"><p>&nbsp;</p></font>
408    <hr size="1" color="#CCCCCC"/>
409     
410      <a name="#_spl_incr"></a>
411
412      <h2>spl_incr  </h2>
413
414      <p><font face="Courier"><i>result = </i>spl_incr(<i><a href="#_spl_incr_keyword_x">x</a>, <a href="#_spl_incr_keyword_y">y</a>, <a href="#_spl_incr_keyword_x2">x2</a></i>, <a href="#_spl_incr_keyword_YP0">YP0</a>=<i>YP0</i>, <a href="#_spl_incr_keyword_YPN_1">YPN_1</a>=<i>YPN_1</i>)</font></p>
415
416   
417
418   
419
420   
421    <h3>Parameters</h3>
422   
423
424    <a name="#_spl_incr_keyword_x"></a>
425    <h4>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
426     
427     
428     
429     
430     
431     
432     
433     
434    </h4>
435
436   
437   
438
439    <a name="#_spl_incr_keyword_y"></a>
440    <h4>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
441     
442     
443     
444     
445     
446     
447     
448     
449    </h4>
450
451   
452   
453
454    <a name="#_spl_incr_keyword_x2"></a>
455    <h4>x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
456     
457     
458     
459     
460     
461     
462     
463     
464    </h4>
465
466   
467   
468   
469
470   
471    <h3>Keywords</h3>
472
473   
474    <a name="#_spl_incr_keyword_YP0"></a>
475    <h4>YP0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
476     
477     
478     
479     
480     
481     
482     
483     
484    </h4>
485
486     The first derivative of the interpolating function at the
487    point X0. If YP0 is omitted, the second derivative at the
488    boundary is set to zero, resulting in a "natural spline."
489   
490    <a name="#_spl_incr_keyword_YPN_1"></a>
491    <h4>YPN_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
492     
493     
494     
495     
496     
497     
498     
499     
500    </h4>
501
502     The first derivative of the interpolating function at the
503    point Xn-1. If YPN_1 is omitted, the second derivative at the
504    boundary is set to zero, resulting in a "natural spline."
505   
506   
507
508   
509   
510   
511   
512   
513   
514
515   
516   
517   
518   
519   
520
521   
522   
523   
524   
525   
526   
527   
528
529    <font size="-3"><p>&nbsp;</p></font>
530    <hr size="1" color="#CCCCCC"/>
531     
532
533   
534
535    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
536
537  </body>
538</html>
Note: See TracBrowser for help on using the repository browser.