fourier analisys - harmonic analisys
1 次查看(过去 30 天)
显示 更早的评论
hi, im doing work about tidal prediction. one of the steps requires calculation of amplitude and phase of some constituents. the way to it is by fourier analisys of a data vector wich holds the measured heights during a period of time. also the speed of each constituent is known. i've tried to you the FFT function but it was not succesfull.
can any one help me on this matter?
4 个评论
Daniel Shub
2012-5-22
@Dany Ummm yeah you did say it is not succesful: "i've tried to you the FFT function but it was not succesfull." What Honglei was asking is what have you tried and why has it not been successful. Provide some simplified code that demonstrates where you are and then tell us what the next step is that you are having problems with. Generally we do not answer questions that ask for help with multiple steps.
回答(3 个)
Daniel Shub
2012-5-22
You can get the amplitude with
abs(Y);
The components are in a very specific order. They are arranged by frequency. The component with the highest amplitude is the most important, but generally does not have the highest or lowest frequency.
0 个评论
Honglei Chen
2012-5-22
You can get amplitude by doing
Y_mag = abs(Y);
The magnitude and phase are in the order of frequencies, from 0 to your sample rate. If you want to see the 0 frequency int the middle, you can use fftshift. As a quick example, you can do the following
freqz(X,1)
0 个评论
Dany
2012-5-22
2 个评论
Honglei Chen
2012-5-22
You can think that way, but the x axis is frequency now, so it tells you how your signal's energy is distributed among different frequencies. I don't quite get why you want to see very large numbers at the first few amplitudes, could you elaborate? Is there a specific pattern you are looking for?
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!