Signal Non-uniform re-sampling

2 ビュー (過去 30 日間)
Tsuwei Tan
Tsuwei Tan 2018 年 5 月 26 日
回答済み: Ameer Hamza 2018 年 5 月 27 日
Please find the attached file which is a 625000x1 signal variable y(t) I also have time series t=0:dt:64-dt; which correspond to y(t) numerically.
if I need a nonlinear time transformation to make h(t)=sqrt(t.^2+const); const=3 sec for instance.
How do I extract y(h(t)) for t=0:dt:5 for instance? The length of the vector would be different from 625000x1 of course. Thank you!!

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 5 月 27 日
t = t=0:dt:64-dt; % [625000x1] vector
y_t = [625000x1] signal
h_t = sqrt(t.^2+const); % transformation
y_h_t = interp1(t, y_t, h_t);
It will give you interpolated y_h_t for the given vector h, you can specify the type of interpolation in the options of interp1.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by