重新取样
选择或插入timeseries
数据使用新的时间矢量
语法
Ts1 = resample(ts, time)
Ts1 = resample(ts, time, interp_method)
Ts1 = resample(ts, time, interp_method, code)
描述
重新取样的壹空间
=重新取样(ts
,时间
)timeseries
对象,ts
,使用新的时间
向量。的重新取样
方法使用默认插值方法,您可以使用getinterpmethod (ts)
语法。
重新取样的壹空间
=重新取样(ts
,时间
,interp_method
)timeseries
对象ts
使用指定的插值方法,interp_method
.
重新取样的壹空间
=重新取样(ts
,时间
,interp_method
,代码
)timeseries
对象ts
用插值方法给出的字符串interp_method
.MATLAB®应用代码
所有样品。
输入参数
|
的 |
|
要用于重采样的时间向量 当 |
|
指定插值方法的字符串。有效的插值方法有 默认值: |
|
指定用户定义的 |
输出参数
|
的 |
例子
这个例子展示了如何重新采样timeseries
对象。
创建一个timeseries
对象。
壹空间= timeseries ([1.1;2.9;3.7;4.0;3.0], 1:5,“名字”,“速度”);
查看时间、数据和插补方式。
壹空间。时间壹空间。数据ts1.getinterpmethod
重新取样壹空间
使用其默认插值方法。
Res_ts =resample(ts1,[1 1.5 3.5 4.5 4.9]);
查看重采样对象的时间、数据和插值方式。
res_ts。时间res_ts。数据res_ts.getinterpmethod
之前介绍过的R2006a
这个话题有帮助吗?