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

Last change on this file since 187 was 187, checked in by pinsard, 18 years ago

introducing hyperlinks in idldoc outputs (2/2)

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>
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    <h3>Version history</h3>
238   
239    <h4>Version</h4> $Id: spl_incr.pro 163 2006-08-29 12:59:46Z navarro $
240
241    <h4>History</h4>
242  Sebastien Masson (smasson@lodyc.jussieu.fr): May-Dec 2005
243
244   
245
246    <h3>Known issues</h3>
247   
248   
249   
250    <h4>Restrictions</h4>
251 It might be possible that y2[i+1]-y2[i] has very small negative
252 values (amplitude smaller than 1.e-6)...
253
254
255   
256   
257   
258   
259   
260   
261   
262
263    <font size="-3"><p>&nbsp;</p></font>
264    <hr size="1" color="#CCCCCC"/>
265     
266      <a name="#_pure_convex"></a>
267
268      <h2>pure_convex  </h2>
269
270      <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>
271
272   
273
274   
275
276   
277    <h3>Parameters</h3>
278   
279
280    <a name="#_pure_convex_keyword_x1"></a>
281    <h4>x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
282      <font size="-1" color="#006633">in</font>
283     
284     
285      <font size="-1" color="#006633">required</font>
286     
287     
288     
289     
290    </h4>
291
292   
293 An n-element (at least 2) input vector that specifies the tabulate points in
294 a strict ascending order.
295
296   
297
298    <a name="#_pure_convex_keyword_x2"></a>
299    <h4>x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
300      <font size="-1" color="#006633">in</font>
301     
302     
303      <font size="-1" color="#006633">required</font>
304     
305     
306     
307     
308    </h4>
309
310   
311 The input values for which the interpolated values are
312 desired. Its values must be strictly monotonically increasing.
313
314   
315
316    <a name="#_pure_convex_keyword_y1"></a>
317    <h4>y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
318      <font size="-1" color="#006633">in</font>
319     
320     
321      <font size="-1" color="#006633">required</font>
322     
323     
324     
325     
326    </h4>
327
328   
329 f(x) = y. An n-element input vector that specifies the values
330    of the tabulated function F(Xi) corresponding to Xi. As f is
331    supposed to be monotonically increasing, y values must be
332    monotonically increasing. y can have equal consecutive values.
333
334   
335
336    <a name="#_pure_convex_keyword_y2"></a>
337    <h4>y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
338     
339     
340     
341     
342     
343     
344     
345     
346    </h4>
347
348   
349   
350
351    <a name="#_pure_convex_keyword_der2"></a>
352    <h4>der2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
353     
354     
355     
356     
357     
358     
359     
360     
361    </h4>
362
363   
364   
365
366    <a name="#_pure_convex_keyword_x"></a>
367    <h4>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
368     
369     
370     
371     
372     
373     
374     
375     
376    </h4>
377
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    <font size="-3"><p>&nbsp;</p></font>
407    <hr size="1" color="#CCCCCC"/>
408     
409      <a name="#_spl_incr"></a>
410
411      <h2>spl_incr  </h2>
412
413      <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>
414
415   
416
417   
418
419   
420    <h3>Parameters</h3>
421   
422
423    <a name="#_spl_incr_keyword_x"></a>
424    <h4>x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
425     
426     
427     
428     
429     
430     
431     
432     
433    </h4>
434
435   
436   
437
438    <a name="#_spl_incr_keyword_y"></a>
439    <h4>y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
440     
441     
442     
443     
444     
445     
446     
447     
448    </h4>
449
450   
451   
452
453    <a name="#_spl_incr_keyword_x2"></a>
454    <h4>x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
455     
456     
457     
458     
459     
460     
461     
462     
463    </h4>
464
465   
466   
467   
468
469   
470    <h3>Keywords</h3>
471
472   
473    <a name="#_spl_incr_keyword_YP0"></a>
474    <h4>YP0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
475     
476     
477     
478     
479     
480     
481     
482     
483    </h4>
484
485     The first derivative of the interpolating function at the
486    point X0. If YP0 is omitted, the second derivative at the
487    boundary is set to zero, resulting in a "natural spline."
488   
489    <a name="#_spl_incr_keyword_YPN_1"></a>
490    <h4>YPN_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
491     
492     
493     
494     
495     
496     
497     
498     
499    </h4>
500
501     The first derivative of the interpolating function at the
502    point Xn-1. If YPN_1 is omitted, the second derivative at the
503    boundary is set to zero, resulting in a "natural spline."
504   
505   
506
507   
508   
509   
510   
511   
512   
513
514   
515   
516   
517   
518   
519
520   
521   
522   
523   
524   
525   
526   
527
528    <font size="-3"><p>&nbsp;</p></font>
529    <hr size="1" color="#CCCCCC"/>
530     
531
532   
533
534    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
535
536  </body>
537</html>
Note: See TracBrowser for help on using the repository browser.