<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/259936</link>
    <title>MATLAB Central Newsreader - Need help with Fourier transform</title>
    <description>Feed for thread: Need help with Fourier transform</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>Wed, 02 Sep 2009 14:46:04 -0400</pubDate>
      <title>Need help with Fourier transform</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/259936#677621</link>
      <author>Steve Amphlett</author>
      <description>&amp;lt;holding head in shame&amp;gt;&lt;br&gt;
&lt;br&gt;
If I want to track single frequencies, I can write code like this:&lt;br&gt;
&lt;br&gt;
%%%%%%%%%%%%%%%%%code%%%%%%%%%%%%%%&lt;br&gt;
&lt;br&gt;
%Time &lt;br&gt;
t=10*(0:32767)'/32768;&lt;br&gt;
&lt;br&gt;
% Pass??&lt;br&gt;
n=(1:length(t))';&lt;br&gt;
n=[n n];&lt;br&gt;
&lt;br&gt;
% My signal - pure real at 10, a mix at 5&lt;br&gt;
x=3*cos(10*2*pi*t)+7*sin(5*2*pi*t+0.2);&lt;br&gt;
&lt;br&gt;
% Dig out the 5 and plot it&lt;br&gt;
re=cos(5*2*pi.*t).*x;&lt;br&gt;
im=sin(5*2*pi.*t).*x;&lt;br&gt;
[sum(re) sum(im)]/length(t)*2&lt;br&gt;
&lt;br&gt;
mag=cumsum([re im])./n*2;&lt;br&gt;
&lt;br&gt;
subplot(211)&lt;br&gt;
plot(t,mag)&lt;br&gt;
&lt;br&gt;
% Dig out the 10 and plot it&lt;br&gt;
re=cos(10*2*pi.*t).*x;&lt;br&gt;
im=sin(10*2*pi.*t).*x;&lt;br&gt;
[sum(re) sum(im)]/length(t)*2&lt;br&gt;
&lt;br&gt;
mag=cumsum([re im])./n*2;&lt;br&gt;
&lt;br&gt;
subplot(212)&lt;br&gt;
plot(t,mag)&lt;br&gt;
&lt;br&gt;
%%%%%%%%%%%%%%%%%code%%%%%%%%%%%%%%&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
So I can recover the amplitudes of the real and imag components in my fake signal with the summations.  But what about the wiggles in the plots?&lt;br&gt;
&lt;br&gt;
&amp;lt;/holding head in shame&amp;gt;</description>
    </item>
    <item>
      <pubDate>Wed, 02 Sep 2009 16:38:32 -0400</pubDate>
      <title>Re: Need help with Fourier transform</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/259936#677660</link>
      <author>Rune Allnor</author>
      <description>On 2 Sep, 16:46, &quot;Steve Amphlett&quot; &amp;lt;Firstname.Lastn...@Where-I-&lt;br&gt;
Work.com&amp;gt; wrote:&lt;br&gt;
&lt;br&gt;
&amp;gt; If I want to track single frequencies, I can write code like this:&lt;br&gt;
...&lt;br&gt;
&amp;gt; So I can recover the amplitudes of the real and imag components in my fake signal with the summations. &#160;But what about the wiggles in the plots?&lt;br&gt;
&lt;br&gt;
...so what you do is to use an integrator to accumulate&lt;br&gt;
the energy of each nominal frequency band...?&lt;br&gt;
&lt;br&gt;
One effect that contributes to the wiggles is the cross-talk&lt;br&gt;
between the crequency components. Umless the two sines are&lt;br&gt;
orthogonal, they will interact with a coupling factor that is&lt;br&gt;
given by the sinc window function at any given N.&lt;br&gt;
&lt;br&gt;
And since N varies all the time - if I understand your code&lt;br&gt;
correctly - the coupling factor also changes all the time,&lt;br&gt;
switching between positive and negative, and sliding further&lt;br&gt;
and further apart in spectrum domain.&lt;br&gt;
&lt;br&gt;
Rune</description>
    </item>
    <item>
      <pubDate>Wed, 02 Sep 2009 17:59:19 -0400</pubDate>
      <title>Re: Need help with Fourier transform</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/259936#677682</link>
      <author>Steve Amphlett</author>
      <description>Rune Allnor &amp;lt;allnor@tele.ntnu.no&amp;gt; wrote in message &amp;lt;b6dff0b3-e1f3-40c7-bff3-6118dda5a8a3@c37g2000yqi.googlegroups.com&amp;gt;...&lt;br&gt;
&amp;gt; On 2 Sep, 16:46, &quot;Steve Amphlett&quot; &amp;lt;Firstname.Lastn...@Where-I-&lt;br&gt;
&amp;gt; Work.com&amp;gt; wrote:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &amp;gt; If I want to track single frequencies, I can write code like this:&lt;br&gt;
&amp;gt; ...&lt;br&gt;
&amp;gt; &amp;gt; So I can recover the amplitudes of the real and imag components in my fake signal with the summations. ?But what about the wiggles in the plots?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; ...so what you do is to use an integrator to accumulate&lt;br&gt;
&amp;gt; the energy of each nominal frequency band...?&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; One effect that contributes to the wiggles is the cross-talk&lt;br&gt;
&amp;gt; between the crequency components. Umless the two sines are&lt;br&gt;
&amp;gt; orthogonal, they will interact with a coupling factor that is&lt;br&gt;
&amp;gt; given by the sinc window function at any given N.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; And since N varies all the time - if I understand your code&lt;br&gt;
&amp;gt; correctly - the coupling factor also changes all the time,&lt;br&gt;
&amp;gt; switching between positive and negative, and sliding further&lt;br&gt;
&amp;gt; and further apart in spectrum domain.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Rune&lt;br&gt;
Cycle-by-cycle update perhaps?  Integrators reset.</description>
    </item>
  </channel>
</rss>

