FFT Transform on vectors
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I have a set of 50Hz Voltage and Current values stored as arrays under variable name 'Volt' and 'Cur' sampled at 1000 Hz
Things to be obtained:
1. Extract the 50 Hz component out of the whole load data in turn. Require a sliding window of 20 ms taking the 50 Hz component of the vector for that sliding window and do the fft of that vector and store it in a separate array.
2. Simliary take 50 Hz component of every 20 ms window and store the same to the array.
Can anyone lend a helping hand regarding the same?
0 Commenti
Risposte (1)
Naman Chaturvedi
il 10 Set 2018
This should help.
For sliding window;
% x=signal
% A=output array
% shift=shift of sliding window
% windowlen=window length
% L=size of signal
A=[];
for i=1:shift:L-windowlen+1
A=[A;abs(fft(x(i:i+windowlen,1)))];
end
For fixed window:
% x=signal
% A=output array
% windowlen=window length
% L=size of signal
A=[];
for i=1:windowlen:L-windowlen+1
A=[A;abs(fft(x(i:i+windowlen,1)))];
end
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!