interpolation and downsampling .mat recorded data

I have a set of data recorded in a mat file. the data was recorded at a 50ms rate and i am replaying the data in a simulation that is running at 8 ms. not working well. so i need to interpolate this data from 50 to 1 then downsample it from 1 to 8. how do i do that? when i open the mat file it has 1x1 structure for X and 1z14 structure for Y. the Y is where the parameters are and each parameter data value is 1x493 where the data values for that parameter reside.

1 个评论

If you have the Signal Processing Toolbox, look at
doc resample
If not, why not just interpolate to the rate desired directly instead of to 1 Hz and then resample there?
doc interp1
Just build the target vector at the desired dt given the sampling rate and sampled data at 50 ms.

请先登录,再进行评论。

回答(0 个)

类别

提问:

2014-5-21

评论:

dpb
2014-5-21

Community Treasure Hunt

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

Start Hunting!

Translated by