<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244177</link>
    <title>MATLAB Central Newsreader - Amplitude in the Frequency Domain</title>
    <description>Feed for thread: Amplitude in the Frequency Domain</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 10 Feb 2009 08:55:04 -0500</pubDate>
      <title>Amplitude in the Frequency Domain</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244177#627274</link>
      <author>Madhu Shurpali</author>
      <description>Hello,&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;I am looking for the relationship between amplitude in the freq domain and time domain. &lt;br&gt;
&lt;br&gt;
For example consider a sine wave with freq 2Hz and amplitude 20 in the time domain. When I FFT it, I get an impuse in the Freq at 2 Hz with a peak different from 20. How are these two related and how can I get them to be equal ?&lt;br&gt;
&lt;br&gt;
Thanks for all the help.  </description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 11:10:09 -0500</pubDate>
      <title>Re: Amplitude in the Frequency Domain</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244177#627293</link>
      <author>Rune Allnor</author>
      <description>On 10 Feb, 09:55, &quot;Madhu Shurpali&quot; &amp;lt;madhu.shurp...@cvgrp.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; Hello,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; =A0 I am looking for the relationship between amplitude in the freq domai=&lt;br&gt;
n and time domain.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; For example consider a sine wave with freq 2Hz and amplitude 20 in the ti=&lt;br&gt;
me domain. When I FFT it, I get an impuse in the Freq at 2 Hz with a peak d=&lt;br&gt;
ifferent from 20. How are these two related&lt;br&gt;
&lt;br&gt;
First of all, the FFT used by matlab is not unitary.&lt;br&gt;
That is, the energy is not preserved. To preserve&lt;br&gt;
energy you need to scale the spectrum by sqrt(N)&lt;br&gt;
where N is the FFT lengh.&lt;br&gt;
&lt;br&gt;
The second issue is spectrum leakage. You will only&lt;br&gt;
recognize one spectrum coefficient with the correct&lt;br&gt;
amplitude (after scaling) iff the frequency is&lt;br&gt;
an integer fraction of the sampling frequency.&lt;br&gt;
&lt;br&gt;
x =3D sin(2*pi*f*t)&lt;br&gt;
f =3D n/N                n integer such that n &amp;lt; N/2&lt;br&gt;
&lt;br&gt;
where N is the length of the signal.&lt;br&gt;
&lt;br&gt;
If this is *not* the case, the energy in the signal&lt;br&gt;
will be distributed across almost all the spectrum&lt;br&gt;
coefficients. This is known as 'spectrum leakage'.&lt;br&gt;
&lt;br&gt;
&amp;gt; and how can I get them to be equal ?&lt;br&gt;
&lt;br&gt;
In general, you can't.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 13:38:02 -0500</pubDate>
      <title>Re: Amplitude in the Frequency Domain</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244177#627323</link>
      <author>Madhu Shurpali</author>
      <description>Thanks Rune for the help. To implement your suggestions in the post, I tried the following script:&lt;br&gt;
&lt;br&gt;
t= [0:0.01:9.99];&lt;br&gt;
&lt;br&gt;
y= 10*sin(2*pi*t) + 20*sin(2*pi*3*t) + 50*cos(2*pi*5*t);&lt;br&gt;
&lt;br&gt;
y1=abs(fftshift(fft(y)));&lt;br&gt;
&lt;br&gt;
N_fft = length(t);&lt;br&gt;
&lt;br&gt;
F2 = [-N_fft/2: N_fft/2-1]*100/N_fft;&lt;br&gt;
&lt;br&gt;
plot(F2, y1);&lt;br&gt;
axis([0 10 0 max(y1)*1.25])&lt;br&gt;
&lt;br&gt;
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. &lt;br&gt;
&lt;br&gt;
Thanks and Regards&lt;br&gt;
Madhu V. Shurpali</description>
    </item>
    <item>
      <pubDate>Tue, 10 Feb 2009 13:59:02 -0500</pubDate>
      <title>Re: Amplitude in the Frequency Domain</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/244177#627329</link>
      <author>David </author>
      <description>&quot;Madhu Shurpali&quot; &amp;lt;madhu.shurpall@cvgrp.com&amp;gt; wrote in message &amp;lt;gmrvvp$i3d$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Thanks Rune for the help. To implement your suggestions in the post, I tried the following script:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; t= [0:0.01:9.99];&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; y= 10*sin(2*pi*t) + 20*sin(2*pi*3*t) + 50*cos(2*pi*5*t);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; y1=abs(fftshift(fft(y)));&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; N_fft = length(t);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; F2 = [-N_fft/2: N_fft/2-1]*100/N_fft;&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; plot(F2, y1);&lt;br&gt;
&amp;gt; axis([0 10 0 max(y1)*1.25])&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 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. &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks and Regards&lt;br&gt;
&amp;gt; Madhu V. Shurpali&lt;br&gt;
&lt;br&gt;
but you didn't scale the amplitude like he said.  divide y1 by N_fft to get the proper amplitudes.</description>
    </item>
  </channel>
</rss>

