<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Complex Number and Fast Fourier Transform in SAS/IML Software and Matrix Computations</title>
    <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97355#M681</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The FFT function in SAS/IML returns a matrix with two column. The first column is the cosine component (or the real part) and the second column is the sine component (or the imaginary component).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data are complex, convert them to a real signal to analyze them SAS. With limited exceptions (eigenvalues, eigenvectors), SAS deals with real numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jun 2013 12:59:02 GMT</pubDate>
    <dc:creator>Rick_SAS</dc:creator>
    <dc:date>2013-06-14T12:59:02Z</dc:date>
    <item>
      <title>Complex Number and Fast Fourier Transform</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97354#M680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm new in SAS, for my projet i have to use SAS to compute the FFT vector for a vector x : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let x be a complex vector (size = n), I need to find the vector z (size = n) after a FFT with my vector x. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So I'm looking for an function similar with z=fft(x) in R.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On SAS documentation website, all i can find concerning FFT is these following link : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_kde_sect015.htm"&gt;http://support.sas.com/documentation/cdl/en/statug/63347/HTML/default/viewer.htm#statug_kde_sect015.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; theoretical explaination, not exctly what i need&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/viewer.htm#langref_sect80.htm"&gt;http://support.sas.com/documentation/cdl/en/imlug/59656/HTML/default/viewer.htm#langref_sect80.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; x here is a NUMERIC vector, so here comes my second question : &lt;STRONG&gt;HOW DO I WORK WITH COMPLEX NOMBER IN SAS ? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;-&amp;gt; this function returns a vector of size np*2 with np=floor(n/2+1), i don't understand &lt;STRONG&gt;why its size is not n*2 ? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oscar C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Jun 2013 11:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97354#M680</guid>
      <dc:creator>pavladoc</dc:creator>
      <dc:date>2013-06-06T11:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: Complex Number and Fast Fourier Transform</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97355#M681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The FFT function in SAS/IML returns a matrix with two column. The first column is the cosine component (or the real part) and the second column is the sine component (or the imaginary component).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data are complex, convert them to a real signal to analyze them SAS. With limited exceptions (eigenvalues, eigenvectors), SAS deals with real numbers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2013 12:59:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97355#M681</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-06-14T12:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Complex Number and Fast Fourier Transform</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97356#M682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Rick. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So FFT in SAS can only deal with real vector.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I don't know how to convert complex signal to real signal :smileyplain:, it's that possible with some functions in SAS ? I can't find informations on Google about this conversion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you a lot for your precious help. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oscar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 13:02:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97356#M682</guid>
      <dc:creator>pavladoc</dc:creator>
      <dc:date>2013-06-17T13:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Complex Number and Fast Fourier Transform</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97357#M683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps I am not understanding your data. To me, all signals are real. At each time t_i, we measure the amplitude h_i = h(t_i). The discrete Fourier transform converts the function from a finite time series with N data points into frequencies f_i. We then model the (unknown continuous) signal as a sum of sines and cosines with the given frequencies.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Granted, the Fourier transform formulas still make sense if the h_i are chosen to be complex numbers, and mathematicians study this complex transformation, but in the applications that I know of, the h_i are real.&amp;nbsp; SAS software handles the real case.&amp;nbsp; If you really want to use complex inputs (whatever that means), you can write h_k = hr_k + i hi_k and the problem splits into two real Fourier transforms.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Jun 2013 13:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97357#M683</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2013-06-17T13:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Complex Number and Fast Fourier Transform</title>
      <link>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97358#M684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My first project here at STC 6 months ago was to translate a spectral theory related code from R to SAS. R has a defined complex type. SAS only has numeric and character variable types. I might be wrong but I did not, at the time, find any way to handle complex numbers naturally in SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As such, I had to breakdown my FFT results into 2 matrices, one real and one complex and manually rebuild all subsequent complex processing steps. E.g. if I I needed to multiply FFTA and FFTB matrix results the code would look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tempRe=FFTARe*FFTBRe - FFTAIm*FFTBIm;&lt;/P&gt;&lt;P&gt;tempIm=FFTARe*FFTBIm + FFTAIm*FFTBRe;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyway, you see the point. It looked like a big deal at first but aside from reducing code readability and requiring additionnal commenting to group single logical operations together, it went smoothly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As to answer your question on why the vector is only of size floor(n/2-1). The expected size n vector in R has all the values a+bi and a-bi. Since SAS doesn't support, per say, the complex type, it simply returns a column for a and a column for b. Thus, you can recreate your size n vector by horizontally concatenating FFT[,1]||(-FFT[,2]). The appearent potential truncation has to do with that either even or odd length initial vector will always produce a duplicate (1+0i) value. I can't give more details on the top of my head, it's been too long. Sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 20:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-IML-Software-and-Matrix/Complex-Number-and-Fast-Fourier-Transform/m-p/97358#M684</guid>
      <dc:creator>Vince28_Statcan</dc:creator>
      <dc:date>2013-07-11T20:30:02Z</dc:date>
    </item>
  </channel>
</rss>

