Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Amplitude in the Frequency Domain
Date: Tue, 10 Feb 2009 13:59:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 22
Message-ID: <gms176$943$1@fred.mathworks.com>
References: <gmrfd8$821$1@fred.mathworks.com> <5053353f-6d6b-479e-8a03-ab631962330c@o11g2000yql.googlegroups.com> <gmrvvp$i3d$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1234274342 9347 172.30.248.38 (10 Feb 2009 13:59:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 10 Feb 2009 13:59:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 791003
Xref: news.mathworks.com comp.soft-sys.matlab:517303


"Madhu Shurpali" <madhu.shurpall@cvgrp.com> wrote in message <gmrvvp$i3d$1@fred.mathworks.com>...
> Thanks Rune for the help. To implement your suggestions in the post, I tried the following script:
> 
> t= [0:0.01:9.99];
> 
> y= 10*sin(2*pi*t) + 20*sin(2*pi*3*t) + 50*cos(2*pi*5*t);
> 
> y1=abs(fftshift(fft(y)));
> 
> N_fft = length(t);
> 
> F2 = [-N_fft/2: N_fft/2-1]*100/N_fft;
> 
> plot(F2, y1);
> axis([0 10 0 max(y1)*1.25])
> 
> The amplitudes in this case were much bigger that what I expected. Please suggest as to whats diff in this script as compared to your reply. 
> 
> Thanks and Regards
> Madhu V. Shurpali

but you didn't scale the amplitude like he said.  divide y1 by N_fft to get the proper amplitudes.