On Wed, Mar 9, 2011 at 6:54 PM, Ozzy Lash
<address@hidden> wrote:
> Greetings all
> I have a frequency domain plot that plots but the amplitude doesn't match
> the equation at all. In the example I have the amplitude set to 8 but when
> I plot it the amplitude
> shows up as 30+ why is this?
> tia sal22
> code below:
> % Take the magnitude of fft of x and scale the fft so that it is not a
> function of the length of x
> mx = abs(fftx)/length(vp_sig_orig);
> % Take the square of the magnitude of fft of x.
> mx = mx.^2;
I think if you don't square the magnitude of the fft, you'll get 8 as
you expect. Your plot implies that you are plotting power, which is
often proportional to amplitude squared.
Bill