fourier analisys - harmonic analisys
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Daniel Shub
le 22 Mai 2012
@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.
Réponses (3)
Daniel Shub
le 22 Mai 2012
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 commentaires
Honglei Chen
le 22 Mai 2012
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 commentaires
Dany
le 22 Mai 2012
2 commentaires
Honglei Chen
le 22 Mai 2012
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?
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!