Help: Excel's Fourier analysis

sulphox

New Member
Joined
Nov 23, 2005
Messages
5
Hi all,

I tried to perform Fourier analysis in excel (under Tools>Data analysis>Fourier analysis) and I got the results that I want.

However, I encountered a problem when I need to plot the graph of the Fourier analysis.

For instance,
I need to plot "t" against "the magnitude of the Fourier analysis"

If Fourier analysis of y(t) is a+ib (where a is a real value, b is a complex value) the magnitude of Fourier analysis is a^2+b^2

Therefore, what I want to ask is that, is there any way I can split the 'a' term and the 'b' term into separate column in excel(besides manually splitting them, because I have a lot of input values)? So that I can find the magnitude easily.

Below are the examples for the scenario that I’ve drawn.
t=-1, -0.9, -0.8, etc
y(t)= rect (t) -> y=0, 0, 0, etc
Fourier analysis of y(t) -> 33, -20.2574504846576-1.99518472667218i, -0.980785280403231-0.195090322016127i, etc (where the real value and complex value under same column)

So is there any way to group all the real number under 1 column i.e.
33, -20.2574504846576, 0.980785280403231

While -1.99518472667218, -0.195090322016127 under the other column.


I am sorry, perhaps the description of my problem seems complex, nevertheless I hope u guys can understand.

Thanks for any help in advance.

Sulphox
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Are you looking for something like this?:
Book1
ABCDE
1Original vectorReal comp.Imaginary comp.Imag. Comp. Magnitudemagnitude
25+2i52i25.385164807
3-3-i-3i13.16227766
4-2+1.5i-21.5i1.52.5
52.5-0.8i2.50.8i0.82.62488095
61+i1i11.414213562
71-i1i11.414213562
Sheet3


Formulas:
B2: =LEFT(A2,IF(ISERROR(FIND("+",A2,2)),FIND("-",A2,2),FIND("+",A2,2))-1)
C2: =RIGHT(A2,LEN(A2)-IF(ISERROR(FIND("+",A2,2)),FIND("-",A2,2),FIND("+",A2,2)))
D2: =IF(NOT(ISNUMBER(--LEFT(C2,LEN(C2)-1))),1,LEFT(C2,LEN(C2)-1))
E2: =SQRT(B2*B2+D2*D2)

and copy the formulas down the column. Is that what you're after?
 
Upvote 0
Before I saw TazGuy's solution, I came up with the following one, but posted later than TazGuy. Sorry!

In cell A1, enter "Complex Number"; in cell B1, enter "Real Part"; in cell C1, enter, "Imaginary Part".

In cell A2, enter the first complex number, and expand that column to accomodate this number.

In cell B2, enter =MID(A2,1,FIND("-",A2,5)-1), and expand that column appropriately. You should see the real part of the complex number there.

In cell C2, enter =MID(A2,LEN(B2)+1,LEN(A2)-LEN(B2)-1), and expand appropriately. You should have the imaginary part of the complex number, without the i at the end, without the ending "i". For the ending "i" to be included, use =MID(A2,LEN(B2)+1,LEN(A2)-LEN(B2)).

Now, you can copy down the two formulas, for the rest of the numbers.
 
Upvote 0
Hi all,

Thanks for all your help.

I think I'll just follow Ronald's method will be easier. :biggrin:

By the way, TazGuy37, you gotta consider the positive and negative sign for the imaginary component. :)

Thanks once again guys.
 
Upvote 0
sulphox said:
By the way, TazGuy37, you gotta consider the positive and negative sign for the imaginary component. :)

True enough. Good thing it really doesn't matter if you're finding the magnitude of the resultant vector.
 
Upvote 0

Forum statistics

Threads
1,203,124
Messages
6,053,645
Members
444,676
Latest member
locapoca

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top