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

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

remove format=raw in all html files 2+ : correction for all_plots; suppression of css and correction of Source links in idldoc html output

File size: 12.2 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
91 Given the arrays X and Y, which tabulate a function (with the X[i]
92 AND Y[i] in ascending order), and given an input value X2, the
93 SPL_INCR function returns an interpolated value for the given values
94 of X2. The interpolation method is based on cubic spline, corrected
95 in a way that interpolated values are also monotonically increasing.
96</div>
97
98     
99
100     
101
102     
103
104     
105      <div id="routine_summary">               
106        <h2>Routine summary</h2>
107       
108        <dl>
109         
110          <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>
111          <dd> </dd>   
112         
113          <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>
114          <dd></dd>     
115         
116          <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>
117          <dd></dd>     
118               
119        </dl>
120      </div>
121     
122
123      <div id="routine_details">
124       
125
126        <div class="routine_details" id="_pure_concave">
127
128          <h2><a class="top" href="#container">top</a>pure_concave </h2>
129       
130          <p class="header">
131            <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>
132       
133          <div class="comments">
134</div>
135
136          <h3>Return value</h3><div class="preformat">
137
138    y2: f(x2) = y2. Double precision array
139</div>
140
141         
142            <h3>Parameters</h3>
143       
144           
145            <h4 id="_pure_concave_param_x1">x1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
146              <span class="attr">in</span>
147             
148             
149              <span class="attr">required</span>
150             
151             
152             
153             
154            </h4>
155       
156          <div class="comments">
157 An n-element (at least 2) input vector that specifies the tabulate points in
158 a strict ascending order.
159</div>
160           
161            <h4 id="_pure_concave_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
162              <span class="attr">in</span>
163             
164             
165              <span class="attr">required</span>
166             
167             
168             
169             
170            </h4>
171       
172          <div class="comments">
173 The input values for which the interpolated values are
174 desired. Its values must be strictly monotonically increasing.
175</div>
176           
177            <h4 id="_pure_concave_param_y1">y1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
178              <span class="attr">in</span>
179             
180             
181              <span class="attr">required</span>
182             
183             
184             
185             
186            </h4>
187       
188          <div class="comments">
189 f(x) = y. An n-element input vector that specifies the values
190 of the tabulated function F(Xi) corresponding to Xi. As f is
191 supposed to be monotonically increasing, y values must be
192 monotonically increasing. y can have equal consecutive values.
193</div>
194           
195            <h4 id="_pure_concave_param_y2">y2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
196             
197             
198             
199             
200             
201             
202             
203             
204            </h4>
205       
206          <div class="comments"></div>
207           
208            <h4 id="_pure_concave_param_der2">der2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
209             
210             
211             
212             
213             
214             
215             
216             
217            </h4>
218       
219          <div class="comments">
220</div>
221           
222            <h4 id="_pure_concave_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
223             
224             
225             
226             
227             
228             
229             
230             
231            </h4>
232       
233          <div class="comments">
234</div>
235           
236
237         
238
239         
240
241          <h3>Examples</h3><div class="preformat">
242
243 IDL> n = 100L
244 IDL> x = (dindgen(n))^2
245 IDL> y = abs(randomn(0, n))
246 IDL> y[n/2:n/2+1] = 0.
247 IDL> y[n-n/3] = 0.
248 IDL> y[n-n/6:n-n/6+5] = 0.
249 IDL> y = total(y, /cumulative, /double)
250 IDL> x2 = dindgen((n-1)^2)
251 IDL> n2 = n_elements(x2)
252 IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0
253 IDL> y2 = spl_incr( x, y, x2)
254 IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land
255 IDL> oplot, x2, y2, color = 100
256 IDL> c = y2[1:n2-1] - y2[0:n2-2]
257 IDL> print, min(c) LT 0
258 IDL> print, min(c, max = ma), ma
259 IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase
260 IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1
261</div>
262          <h3>Version history</h3>
263         
264          <h4>Version</h4><div class="preformat"> $Id: spl_incr.pro 163 2006-08-29 12:59:46Z navarro $
265</div>
266          <h4>History</h4><div class="preformat">
267  Sebastien Masson (smasson@lodyc.jussieu.fr): May-Dec 2005
268</div>
269         
270         
271          <h3>Known issues</h3>
272         
273         
274         
275          <h4>Restrictions</h4><div class="preformat">
276 It might be possible that y2[i+1]-y2[i] has very small negative
277 values (amplitude smaller than 1.e-6)...
278</div>
279       
280         
281         
282         
283         
284         
285         
286         
287       
288          <h3>Statistics</h3>
289          <table class="statistics">
290            <tr><td>McCabe cyclic</td><td>           1</td></tr>
291            <tr><td>McCabe essential</td><td>           1</td></tr>
292            <tr><td>McCabe modular design</td><td>           1</td></tr>
293          </table>
294         
295       
296        </div>
297       
298
299        <div class="routine_details" id="_pure_convex">
300
301          <h2><a class="top" href="#container">top</a>pure_convex </h2>
302       
303          <p class="header">
304            <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>
305       
306          <div class="comments"></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-element (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-element 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"></div>
389           
390            <h4 id="_pure_convex_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
391             
392             
393             
394             
395             
396             
397             
398             
399            </h4>
400       
401          <div class="comments">
402</div>
403           
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          <h3>Statistics</h3>
431          <table class="statistics">
432            <tr><td>McCabe cyclic</td><td>           1</td></tr>
433            <tr><td>McCabe essential</td><td>           1</td></tr>
434            <tr><td>McCabe modular design</td><td>           1</td></tr>
435          </table>
436         
437       
438        </div>
439       
440
441        <div class="routine_details" id="_spl_incr">
442
443          <h2><a class="top" href="#container">top</a>spl_incr </h2>
444       
445          <p class="header">
446            <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>
447       
448          <div class="comments"></div>
449
450         
451
452         
453            <h3>Parameters</h3>
454       
455           
456            <h4 id="_spl_incr_param_x">x&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
457             
458             
459             
460             
461             
462             
463             
464             
465            </h4>
466       
467          <div class="comments"></div>
468           
469            <h4 id="_spl_incr_param_y">y&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
470             
471             
472             
473             
474             
475             
476             
477             
478            </h4>
479       
480          <div class="comments"></div>
481           
482            <h4 id="_spl_incr_param_x2">x2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
483             
484             
485             
486             
487             
488             
489             
490             
491            </h4>
492       
493          <div class="comments"></div>
494           
495
496         
497
498         
499
500            <h3>Keywords</h3>
501           
502            <h4 id="_spl_incr_keyword_YP0">YP0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
503             
504             
505             
506             
507             
508             
509             
510             
511            </h4>
512       
513            <div class="comments"> The first derivative of the interpolating function at the
514    point X0. If YP0 is omitted, the second derivative at the
515    boundary is set to zero, resulting in a "natural spline."</div>
516           
517            <h4 id="_spl_incr_keyword_YPN_1">YPN_1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
518             
519             
520             
521             
522             
523             
524             
525             
526            </h4>
527       
528            <div class="comments"> The first derivative of the interpolating function at the
529    point Xn-1. If YPN_1 is omitted, the second derivative at the
530    boundary is set to zero, resulting in a "natural spline."</div>
531           
532         
533
534         
535         
536         
537         
538         
539         
540         
541         
542         
543         
544         
545         
546       
547         
548         
549         
550         
551         
552         
553         
554       
555          <h3>Statistics</h3>
556          <table class="statistics">
557            <tr><td>McCabe cyclic</td><td>          46</td></tr>
558            <tr><td>McCabe essential</td><td>          10</td></tr>
559            <tr><td>McCabe modular design</td><td>           1</td></tr>
560          </table>
561         
562       
563        </div>
564       
565      </div>
566
567     
568
569      <div id="tagline">Produced by IDLdoc 2.0.</div>
570
571    </div>
572
573  </body>
574</html>
Note: See TracBrowser for help on using the repository browser.