# Solving Complex formula w/ Exponential & Exponential w/ Imaginary number

1. ## Solving Complex formula w/ Exponential & Exponential w/ Imaginary number

Can someone help me setup the attached formula in excel, I have attached the spreadsheet? I have Microsoft office 365. I can easily solve the equation in MathCad, but it's difficult to setup in Excel. The equation is unit-less since the units cancel one-another.

alpha =sqrt(R/S)*exp(-Beta*Omega*S/Vs)*imexp(-i*omega*S/Vs)

for S = 8

for S = 10

Thanks  Register To Reply

2. ## Re: Solving Complex formula w/ Exponential & Exponential w/ Imaginary number

Complex numbers can be tricky, there are specific functions for algebraic operations with them.
First you must enable Analysis toolpack under Add-ins.

Then in C17 and C19 you can use the following

=IMDIV(IMPRODUCT(C10,C8,COMPLEX(0,-1)),C11)

=IMPRODUCT(C15,EXP(C16),IMEXP(C17))

HTH,

Francesco  Register To Reply

3. ## Re: Solving Complex formula w/ Exponential & Exponential w/ Imaginary number

Thanks Hydraulics! Works well. Quick question, how can I round the real and ima ginary part to show 4 decimal places ,each? I have inserted the round function in several locations within the equation, but I keep receiving the #VALUE! Error.  Register To Reply

4. ## Re: Solving Complex formula w/ Exponential & Exponential w/ Imaginary number

Hydraulic, Thanks! See my additional question down below. I was able to round the 4 decimals, but I had to break the results with:

=IMREAL(C19)
=IMAGINARY(C19)

=COMPLEX(ROUND(C21,4),ROUND(C22,4))

I want to round in cell C19 and minimize breaking into parts.  Register To Reply

5. ## Re: Solving Complex formula w/ Exponential & Exponential w/ Imaginary number

Excel cell's can contain either text or double -- they cannot recognize a "complex number" data type. In these complex number formulas, the complex number is input/output as a text string, so Excel cannot apply number formatting to it. At some level, what you are doing (break the complex number up into real and imaginary parts -> format/round those numbers -> recombine into a complex number text string) is the only way to do it (at least that I am aware of).

If you don't like spreading that out over several cells, then it should be possible to combine/nest formulas into a single cell (probably with duplicated effort, but I would not expect these calculations to be slow so the duplicated effort should not impair performance too much).

I would ask at this point -- what is your concern with breaking the number up, formatting, and recombining that you are currently doing?  Register To Reply

6. Thanks a bunch!. I'll tag it solved.

I was hesitant to split the parts and recombine the complex equation , because this is the 1st step to build several matrices. However, it should be no big deal.  Register To Reply

There are currently 1 users browsing this thread. (0 members and 1 guests) 