File: splinterp.htm

package info (click to toggle)
extrema 4.3.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 19,212 kB
  • ctags: 6,452
  • sloc: cpp: 86,428; sh: 8,229; makefile: 814
file content (51 lines) | stat: -rw-r--r-- 2,671 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<HTML>
<HEAD>
<TITLE>SPLINTERP function</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF" fgcolor="#000000">

<P><font size="+3" color="green"><B>SPLINTERP function</B></font></P>
<P>
<TABLE border="1" cols="2" frame="box" rules="all" width="572">
<TR>
<TD width="15%" valign="top"><B>Syntax</B>:</TD>
<TD width="85%"><CODE>
mout = SPLINTERP(x,y,n)</CODE>
</TD></TR>
</table></p>
<p>
 The <CODE>SPLINTERP</CODE> function interpolates the data contained in vector <CODE>x</CODE>,
 the independent variable, and vector <CODE>y</CODE>, the dependent variable.  There are no
 restrictions on <CODE>x</CODE>, it doesn't even need to be increasing. The number of interpolant
 locations is given in scalar <CODE>n</CODE>, which must be greater than <code>1</code>. The output
 of the <CODE>SPLINTERP</CODE> function is a matrix with <CODE>n</CODE> rows and <code>2</code>
 columns. The first column will contain the output locations and the second column the
 interpolated values.</p>
<P>
 <font size="+1" color="green"><B>Method</B></font></P>
<p> 
 The points are first parameterized in terms of normalized arc length. The normalized length of
 <CODE>x</CODE> is the real length divided by the range of <CODE>x</CODE>, that is, the maximum
 value minus the minimum value. The arclength at a point is approximated by the sum of the lengths
 of straight line segments connecting all points up to that point. A spline under tension is
 calculated for <CODE>x</CODE> versus arc length and <CODE>y</CODE> versus arc length. The
 <CODE>x</CODE> and <CODE>y</CODE> values are interpolated separately and then combined to
 form the output interpolant.</p>
<P>
 <font size="+1" color="green"><B>Tension</B></font></P>
<p>
 The interpolant is calculated by the method of cubic splines under tension. The tension factor
 corresponds to the <i>curviness</i>, and must be greater than zero. If it is close to zero, each
 interpolated function is almost a cubic spline and the resulting curve is quite <i>loose</i>.
 If the tension is large, then the resultant is almost linear. The tension used is the current value
 of <CODE><a href="../../../Characteristics/GeneralGraph/tension/tension.htm">TENSION</a></CODE>,
 which may be changed with the <CODE><font color="blue">
 <a href="../../../SetCommand/setcommand.htm">SET TENSION</a></font></CODE> command.</P>
<P>
 <a href="fc.htm"><img align=middle border="0" src="../../../shadow_left.gif">&nbsp;
 <font size="+1" color="olive">Fritch-Carlson interpolation</font></a><br />
 <a href="bivinterp.htm"><img align=middle border="0" src="../../../shadow_right.gif">&nbsp;
 <font size="+1" color="olive">2D interpolation</font></a>
</P>
</BODY>
</HTML>