How to use sampling frequency concept when dealing with an array of sinusoidal data?
2 views (last 30 days)
Show older comments
Hello all, So first I was getting myself used to Matlab FFT, for example I would do the following:
clc fs = 4; t = 0:1/fs:1-1/fs; x1 = sin((2*pi)*t); y1 = fft(x1,n);
FT_power1 = abs(y1(1:floor(n/2))).^2; FT_phase1= (((angle(y1(1:floor(n/2))))) * 180/pi); [c1,i1] = max(FT_power1); phase(1) = FT_phase1(i1);
And I think I have a decent understanding of why use Nyquist and sampling frequency parameter. However now, I am suppose to do the same procedure on an array of output (that is sinusoidal coming from a different subroutine I have), which means my output array has 2 columns, the first is for the time vector and the second is the actual sinusoidal response. Now, how to incorporate the fs parameter? I am confused all the sudden. Please let me know if you need more details. Thank you.
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!