ts = setinterpmethod(ts, method)
ts = setinterpmethod(ts, fhandle)
ts = setinterpmethod(ts, interpobj)
sets the default interpolation method, ts
= setinterpmethod(ts
, method
)method
,
for timeseries
object, ts
,
and outputs it to ts1
.
sets the default interpolation method for ts
= setinterpmethod(ts
, fhandle
) timeseries
object ts
,
where fhandle
is a function handle to the interpolation
method.
sets the default interpolation method for ts
= setinterpmethod(ts
, interpobj
)timeseries
object ts
,
where interpobj
is a tsdata.interpolation
object
that directly replaces the interpolation object stored in ts
.
This method is case sensitive.
|
The |
|
A string specifying the interpolation method. Valid values are Default: |
|
A function handle to the interpolation method. The order of
input arguments defining the function handle must be |
|
A |
|
The |
Set the default interpolation method for timeseries
object ts
to
zero order hold:
ts = timeseries(rand(100,1),1:100); ts = setinterpmethod(ts,'zoh'); plot(ts);
Set the default interpolation method for timeseries
object ts
,
where fhandle
is a function handle to the interpolation
method defined by function handle myFuncHandle
:
ts = timeseries(rand(100,1),1:100); myFuncHandle = @(new_time, time, data)... interp1(time, data, new_time,... 'linear','extrap'); ts = setinterpmethod(ts, myFuncHandle); ts = resample(ts, [-5:0.1:10]); plot(ts);
Set the default interpolation method for timeseries
object ts
to a tsdata.interpolation
object:
ts = timeseries(rand(100,1),1:100); myFuncHandle = @(new_time, time, data)... interp1(time, data, new_time,... 'linear','extrap'); myInterpObj = tsdata.interpolation(myFuncHandle); ts = setinterpmethod(ts,myInterpObj); plot(ts);