Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Data analysis using FFT
Replies: 1   Last Post: Feb 12, 2013 7:18 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Derek Goring

Posts: 3,893
Registered: 12/7/04
Re: Data analysis using FFT
Posted: Feb 12, 2013 7:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Wednesday, February 13, 2013 12:44:09 PM UTC+13, John Ng wrote:
> Dear all,
>
>
>
> I have a system that generates a time series, called data1.
>
>
>
> Now, I make certain change to the system, and obtain time series data2.
>
>
>
> I want to quantify the effect of the change that I made to the system. And this is what I have done:
>
>
>
> samplingT=.001;
>
> N1=length(data1);
>
> pos1fft1 = fft(data1, N1);
>
> Pd1=abs(pos1fft1)/N1;
>
>
>
> N2=length(data2);
>
> pos1fft2 = fft(data2, N2);
>
> Pd2=abs(pos1fft1)/N2;
>
>
>
> coef=pos1fft2 -pos1fft1 ;
>
> pow=Pd2-Pd1;
>
>
>
> So, between coef and pow, which is better representation of the change I made to the system? Or none of them? Please advise!
>
>
>
> John


Well, pow will be a bad representation because you've made a coding error in calculating Pd2.
Also, unless N1=N2, the evaluation of coef and pow will not work because the transforms will be different sizes.
Otherwise, coef is obviously better than pow because it contains more information (phase differences as well as amplitude differences).
But, of course, you need to figure out how to interpret the complex numbers that coef contains.............

Note that if data1 and data2 are real, you only need to consider pos1fft1(1:N1/2) and pos1fft2(1:N2/2) because the other half is simply the complex conjugate.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.