Programmer Guide/Command Reference/EVAL/interp: Difference between revisions

From STX Wiki
Jump to navigationJump to search
m (1 revision: Initial import)
No edit summary
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
{{DISPLAYTITLE:{{SUBPAGENAME}}}}
=====interp=====
Create an interpolated copy of the vector <var>x</var>.
Create an interpolated copy of the vector <var>x</var>.
;Usage:<code>interp(<var>x</var>, <var>n</var>, <var>type</var> {, <var>mv</var>})</code>
:;<var>x</var>:vector to be interpolated
:;<var>n</var>:length of the interpolated output vector; the interpolated vector can be shorter or longer than the original
:;<var>type</var>:the type of interpolation to perform
::''type''='''0''': linear interpolation
::''type''='''1''': cubic spline interpolation
:;<var>mv</var>:the value to use for ''missing values''. If ''mv'' is given, then interpolation is stopped when <code>''x''[i] = ''mv''</code>. This means that the sections without missing values are individually interpolated. If ''mv'' is not supplied, the whole vector ''x'' is interpolated.
::'''note''': The missing value handling is implemented only for linear interpolation (''type''='''0''')
;Result:The interpolated vector ''y'' with length ''n''.
;See also: [[../rpolyreg|rpolyreg]], [[../qinterp|qinterp]], [[../map2map|map2map]]


{|
[[../#Functions|<function list>]]
|-
|Usage:
|interp(x, <var>n</var>, <var>type</var>, <var>mv</var>)
|-
|Parameters:
|{|
|-
|<var>n</var>
|the length of the interpolated vector.
|-
|type
|the type of interpolation to perform. Currently only linear interpolation is supported (type = 0).
|-
|mv
|the value to use for 'missing values'. If mv is given, then interpolation is stopped when <var>x</var>[i] = <var>mv</var>. This means that the sections without missing values are individually interpolated.
|}
 
 
|
|}

Latest revision as of 09:58, 30 September 2015

Create an interpolated copy of the vector x.

Usage
interp(x, n, type {, mv})
x
vector to be interpolated
n
length of the interpolated output vector; the interpolated vector can be shorter or longer than the original
type
the type of interpolation to perform
type=0: linear interpolation
type=1: cubic spline interpolation
mv
the value to use for missing values. If mv is given, then interpolation is stopped when x[i] = mv. This means that the sections without missing values are individually interpolated. If mv is not supplied, the whole vector x is interpolated.
note: The missing value handling is implemented only for linear interpolation (type=0)
Result
The interpolated vector y with length n.
See also
rpolyreg, qinterp, map2map

<function list>

Navigation menu

Personal tools