source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/spl_incr.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

File size: 12.3 KB
Line 
1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
9    <title>spl_incr.pro (SAXO Documentation)</title>
10
11   
12    <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" />
14   
15
16    <script type="text/javascript">
17      function setTitle() {
18        parent.document.title="spl_incr.pro (SAXO Documentation)";
19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
26  <h1>SAXO Documentation</h1>
27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
35      <td><a href="./../overview.html" title="Overview of library">Overview</a></td>
36     
37
38     
39      <td >Directory</td>
40     
41
42     
43      <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td>
44     
45
46     
47      <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
48     
49
50     
51      <td><a href="./../search-page.html" title="Search library">Search</a></td>
52     
53
54      <td id="selected">File</td>
55
56     
57      <td><a href="../../../Interpolation//spl_incr.pro" title="Source code of a file">Source</a></td>
58     
59
60     
61      <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
74<a href="spl_fstdrv.html">&lt;&lt;prev file</a> | <a href="spl_keep_mean.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="spl_incr.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | <a href="#routine_summary">routine</a>&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a>
75
76</div>
77
78
79    <div id="container">
80
81      <h1 class="directory"><a href="directory-overview.html">Interpolation/</a></h1>
82      <h2 class="pro_file">spl_incr.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 Given the arrays X and Y, which tabulate a function (with the X[i]
91 AND Y[i] in ascending order), and given an input value X2, the
92 spl_incr function returns an interpolated value for the given values
93 of X2. The interpolation method is based on cubic spline, corrected
94 in a way that interpolated values are also monotonically increasing.
95</div>
96
97     
98
99     
100
101     
102
103     
104      <div id="routine_summary">               
105        <h2>Routine summary</h2>
106       
107        <dl>
108         
109          <dt><p><a href="#_pure_concave"><span class="result">result = </span>pure_concave(<span class="result">x1, x2, y1, y2, der2, x</span>)</a></p><dt>
110          <dd> </dd>   
111         
112          <dt><p><a href="#_pure_convex"><span class="result">result = </span>pure_convex(<span class="result">x1, x2, y1, y2, der2, x</span>)</a></p><dt>
113          <dd> </dd>   
114         
115          <dt><p><a href="#_spl_incr"><span class="result">result = </span>spl_incr(<span class="result">x, y, x2</span>, YP0=<span class="result">YP0</span>, YPN_1=<span class="result">YPN_1</span>)</a></p><dt>
116          <dd> </dd>   
117               
118        </dl>
119      </div>
120     
121
122      <div id="routine_details">
123       
124
125        <div class="routine_details" id="_pure_concave">
126
127          <h2><a class="top" href="#container">top</a>pure_concave </h2>
128       
129          <p class="header">
130            <span class="result">result = </span>pure_concave(<span class="result"><a href="#_pure_concave_param_x1">x1</a>, <a href="#_pure_concave_param_x2">x2</a>, <a href="#_pure_concave_param_y1">y1</a>, <a href="#_pure_concave_param_y2">y2</a>, <a href="#_pure_concave_param_der2">der2</a>, <a href="#_pure_concave_param_x">x</a></span>)</p>
131       
132          <div class="comments">
133</div>
134
135          <h3>Return value</h3><div class="preformat">
136 y2: f(x2) = y2. Double precision array
137</div>
138
139         
140            <h3>Parameters</h3>
141       
142           
143            <h4 id="_pure_concave_param_x1">x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
144              <span class="attr">in</span>
145             
146             
147              <span class="attr">required</span>
148             
149             
150             
151             
152            </h4>
153       
154          <div class="comments">
155 An n-elements (at least 2) input vector that specifies the tabulate points in
156 a strict ascending order.
157</div>
158           
159            <h4 id="_pure_concave_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160              <span class="attr">in</span>
161             
162             
163              <span class="attr">required</span>
164             
165             
166             
167             
168            </h4>
169       
170          <div class="comments">
171 The input values for which the interpolated values are
172 desired. Its values must be strictly monotonically increasing.
173</div>
174           
175            <h4 id="_pure_concave_param_y1">y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
176              <span class="attr">in</span>
177             
178             
179              <span class="attr">required</span>
180             
181             
182             
183             
184            </h4>
185       
186          <div class="comments">
187 f(x) = y. An n-elements input vector that specifies the values
188 of the tabulated function F(Xi) corresponding to Xi. As f is
189 supposed to be monotonically increasing, y values must be
190 monotonically increasing. y can have equal consecutive values.
191</div>
192           
193            <h4 id="_pure_concave_param_y2">y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
194             
195             
196             
197             
198             
199             
200             
201             
202            </h4>
203       
204          <div class="comments"></div>
205           
206            <h4 id="_pure_concave_param_der2">der2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
207             
208             
209             
210             
211             
212             
213             
214             
215            </h4>
216       
217          <div class="comments">
218</div>
219           
220            <h4 id="_pure_concave_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
221             
222             
223             
224             
225             
226             
227             
228             
229            </h4>
230       
231          <div class="comments">
232</div>
233           
234
235         
236
237         
238
239          <h3>Examples</h3><div class="preformat">
240
241   IDL> n = 100L
242   IDL> x = (dindgen(n))^2
243   IDL> y = abs(randomn(0, n))
244   IDL> y[n/2:n/2+1] = 0.
245   IDL> y[n-n/3] = 0.
246   IDL> y[n-n/6:n-n/6+5] = 0.
247   IDL> y = total(y, /cumulative, /double)
248   IDL> x2 = dindgen((n-1)^2)
249   IDL> n2 = n_elements(x2)
250   IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0
251   IDL> y2 = spl_incr( x, y, x2)
252   IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land
253   IDL> oplot, x2, y2, color = 100
254   IDL> c = y2[1:n2-1] - y2[0:n2-2]
255   IDL> print, min(c) LT 0
256   IDL> print, min(c, max = ma), ma
257   IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase
258   IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1
259</div>
260          <h3>Version history</h3>
261         
262          <h4>Version</h4><div class="preformat">
263 $Id: spl_incr.pro 371 2008-08-07 09:32:02Z pinsard $
264</div>
265          <h4>History</h4><div class="preformat">
266  Sebastien Masson (smasson@lodyc.jussieu.fr): May-Dec 2005
267</div>
268         
269         
270          <h3>Known issues</h3>
271         
272         
273         
274          <h4>Restrictions</h4><div class="preformat">
275 It might be possible that y2[i+1]-y2[i] has very small negative
276 values (amplitude smaller than 1.e-6)...
277</div>
278       
279         
280         
281         
282         
283         
284         
285         
286       
287          <h3>Statistics</h3>
288          <table class="statistics">
289            <tr><td>McCabe cyclic</td><td>           1</td></tr>
290            <tr><td>McCabe essential</td><td>           1</td></tr>
291            <tr><td>McCabe modular design</td><td>           1</td></tr>
292          </table>
293         
294       
295        </div>
296       
297
298        <div class="routine_details" id="_pure_convex">
299
300          <h2><a class="top" href="#container">top</a>pure_convex </h2>
301       
302          <p class="header">
303            <span class="result">result = </span>pure_convex(<span class="result"><a href="#_pure_convex_param_x1">x1</a>, <a href="#_pure_convex_param_x2">x2</a>, <a href="#_pure_convex_param_y1">y1</a>, <a href="#_pure_convex_param_y2">y2</a>, <a href="#_pure_convex_param_der2">der2</a>, <a href="#_pure_convex_param_x">x</a></span>)</p>
304       
305          <div class="comments">
306</div>
307
308         
309
310         
311            <h3>Parameters</h3>
312       
313           
314            <h4 id="_pure_convex_param_x1">x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
315              <span class="attr">in</span>
316             
317             
318              <span class="attr">required</span>
319             
320             
321             
322             
323            </h4>
324       
325          <div class="comments">
326 An n-elements (at least 2) input vector that specifies the tabulate points in
327 a strict ascending order.
328</div>
329           
330            <h4 id="_pure_convex_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
331              <span class="attr">in</span>
332             
333             
334              <span class="attr">required</span>
335             
336             
337             
338             
339            </h4>
340       
341          <div class="comments">
342 The input values for which the interpolated values are
343 desired. Its values must be strictly monotonically increasing.
344</div>
345           
346            <h4 id="_pure_convex_param_y1">y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
347              <span class="attr">in</span>
348             
349             
350              <span class="attr">required</span>
351             
352             
353             
354             
355            </h4>
356       
357          <div class="comments">
358 f(x) = y. An n-elements input vector that specifies the values
359    of the tabulated function F(Xi) corresponding to Xi. As f is
360    supposed to be monotonically increasing, y values must be
361    monotonically increasing. y can have equal consecutive values.
362</div>
363           
364            <h4 id="_pure_convex_param_y2">y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
365             
366             
367             
368             
369             
370             
371             
372             
373            </h4>
374       
375          <div class="comments"></div>
376           
377            <h4 id="_pure_convex_param_der2">der2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
378             
379             
380             
381             
382             
383             
384             
385             
386            </h4>
387       
388          <div class="comments">
389</div>
390           
391            <h4 id="_pure_convex_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
392             
393             
394             
395             
396             
397             
398             
399             
400            </h4>
401       
402          <div class="comments">
403</div>
404           
405
406         
407
408         
409
410         
411         
412         
413         
414         
415         
416         
417         
418         
419         
420         
421         
422       
423         
424         
425         
426         
427         
428         
429         
430       
431          <h3>Statistics</h3>
432          <table class="statistics">
433            <tr><td>McCabe cyclic</td><td>           1</td></tr>
434            <tr><td>McCabe essential</td><td>           1</td></tr>
435            <tr><td>McCabe modular design</td><td>           1</td></tr>
436          </table>
437         
438       
439        </div>
440       
441
442        <div class="routine_details" id="_spl_incr">
443
444          <h2><a class="top" href="#container">top</a>spl_incr </h2>
445       
446          <p class="header">
447            <span class="result">result = </span>spl_incr(<span class="result"><a href="#_spl_incr_param_x">x</a>, <a href="#_spl_incr_param_y">y</a>, <a href="#_spl_incr_param_x2">x2</a></span>, <a href="#_spl_incr_keyword_YP0">YP0</a>=<span class="result">YP0</span>, <a href="#_spl_incr_keyword_YPN_1">YPN_1</a>=<span class="result">YPN_1</span>)</p>
448       
449          <div class="comments">
450</div>
451
452         
453
454         
455            <h3>Parameters</h3>
456       
457           
458            <h4 id="_spl_incr_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
459             
460             
461             
462             
463             
464             
465             
466             
467            </h4>
468       
469          <div class="comments"></div>
470           
471            <h4 id="_spl_incr_param_y">y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
472             
473             
474             
475             
476             
477             
478             
479             
480            </h4>
481       
482          <div class="comments"></div>
483           
484            <h4 id="_spl_incr_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
485             
486             
487             
488             
489             
490             
491             
492             
493            </h4>
494       
495          <div class="comments"></div>
496           
497
498         
499
500         
501
502            <h3>Keywords</h3>
503           
504            <h4 id="_spl_incr_keyword_YP0">YP0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
505             
506             
507             
508             
509             
510             
511             
512             
513            </h4>
514       
515            <div class="comments">
516 The first derivative of the interpolating function at the
517    point X0. If YP0 is omitted, the second derivative at the
518    boundary is set to zero, resulting in a "natural spline."
519</div>
520           
521            <h4 id="_spl_incr_keyword_YPN_1">YPN_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
522             
523             
524             
525             
526             
527             
528             
529             
530            </h4>
531       
532            <div class="comments">
533 The first derivative of the interpolating function at the
534    point Xn-1. If YPN_1 is omitted, the second derivative at the
535    boundary is set to zero, resulting in a "natural spline."</div>
536           
537         
538
539         
540         
541         
542         
543         
544         
545         
546         
547         
548         
549         
550         
551       
552         
553         
554         
555         
556         
557         
558         
559       
560          <h3>Statistics</h3>
561          <table class="statistics">
562            <tr><td>McCabe cyclic</td><td>          46</td></tr>
563            <tr><td>McCabe essential</td><td>          10</td></tr>
564            <tr><td>McCabe modular design</td><td>           1</td></tr>
565          </table>
566         
567       
568        </div>
569       
570      </div>
571
572     
573
574      <div id="tagline">Produced by IDLdoc 2.0.</div>
575
576    </div>
577
578  </body>
579</html>
Note: See TracBrowser for help on using the repository browser.