- The letter "A" as the name of the variable, which holds the force data, is a poor choice.
- There is half a second more acceleration data than force data.
- interp1() is older than resample().
- to use resample() requires more reading of the documentation
Resampling two signals to the same frequency
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Louise
am 12 Nov. 2020
Bearbeitet: per isakson
am 13 Nov. 2020
Hi guys,
I've attached two matrix.
Force data were collected at 2000 Hz and acceleration data at 2222 Hz.
My goal is to sample these two signals to the same frequency. I guess that the best method is to resample the acceleration data at 2222 Hz ?
I'm quite lost between the Matlab functions interp, resample, etc...
Could you help me please ?
Thanks in advance for your help,
0 Kommentare
Akzeptierte Antwort
per isakson
am 13 Nov. 2020
Bearbeitet: per isakson
am 13 Nov. 2020
Comments
To use interp1() (or resample()) time data is needed.
Try this script to see if it does what you want.
%%
A = load('Acceleration_Data.mat');
F = load('Force_Data.mat');
%%
A.time = linspace( 0, numel(A.B)/2222, numel(A.B) );
F.time = linspace( 0, numel(F.A)/2000, numel(F.A) );
%%
F.resample = interp1( F.time, F.A, A.time, 'linear', nan );
"I guess that the best method is to resample the acceleration data at 2222 Hz ?" I'm not sure what this means.
Do you want to resample acceleration?
A.resample = interp1( A.time, A.B, F.time, 'linear', nan );
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!