Resampling two signals to the same sampling time and length
古いコメントを表示
Hi guys !
For further system analysis I need to adapt two signals to the same length and sampling time. The signals are measured outputs of the system and the underlying input signals. They are sampled as follows:
t_input = 5ms
t_output = 2ms
Consequently, the signal vectors are of different lengths, too. My goal is to resample the signals to the output sampling time of t_output = 2ms and to make them equal-length. As an interpolation I want to use a linear interpolation. I have tried different methods and wrote functions to obtain the results, but have not been successful for days now. I used interp1 to interpolate between the input signal values, but it either didn't work or I haven't been able to make it work. I now seek help from you guys to fight this task! I do not want to use the matlab resampling function!
I have attached the input signal sine_input and the output signal sine_output. They consist of two columns, the first is the time stamp vector, the second column contains the measured output values or given input values, respectively.
I hope you guys can help !!!
Thank YOU !
6 件のコメント
Dimitris Kalogiros
2019 年 10 月 21 日
Why you don't like resample function ?
Adam
2019 年 10 月 21 日
interp1 should work fine, but you didn't show how you used it so it's hard to say much more.
Aladin Djuhera
2019 年 10 月 21 日
Star Strider
2019 年 10 月 21 日
What are in your .mat files?
Is the first column time, or something else? When I plotted them, with the second columns (signal?) as a function of the first columns (time?), the first columns were not even close to overlapping. They appeared to have nothing at all in common.
Aladin Djuhera
2019 年 10 月 21 日
Star Strider
2019 年 10 月 21 日
‘So you wont be able to plot the signal over time.’
Then there is nothing to do.
I will delete the files.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Multirate Signal Processing についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!