zahriladha
Junior Member level 2
separate real and imaginary part matlab
Dear experts,
I have problems to separate the real parts and imaginary parts.
let says we have the following equations:
y1 = (a^2-5*a+1-w^2+3*i*w)/(3*a^2+7*a-3*w^2+i*w)
where i=j (imaginary part)
To separate the real parts and imginary parts using matlab, a multiplication with:
(3*a^2+7*a-3*w^2-i*w) is performed to numerator & denumerator.
The M file is shown as below:
w='w'
y1=(a^2-5*a+1-w^2+3*i*w)/(3*a^2+7*a-3*w^2+i*w)
conj=(3*a^2+7*a-3*w^2-i*w)
y1_new=((a^2-5*a+1-w^2+3*i*w)*conj)/((3*a^2+7*a-3*w^2+i*w)*conj)
when I peformed with Matlab, the results were not as expected in which I need to remain the variable a & w. Actually, I'm not sure how to perform separate real & imaginary parts using Matlab.
Could someone help me to advise 1) the appropriate method to separate the real & imaginary parts. 2) How to perform the dy1_new/dw from y1_new.
Finally I should get the value of 'a' and 'w' after answered the questions in 1) and 2).
Thank you very much
Dear experts,
I have problems to separate the real parts and imaginary parts.
let says we have the following equations:
y1 = (a^2-5*a+1-w^2+3*i*w)/(3*a^2+7*a-3*w^2+i*w)
where i=j (imaginary part)
To separate the real parts and imginary parts using matlab, a multiplication with:
(3*a^2+7*a-3*w^2-i*w) is performed to numerator & denumerator.
The M file is shown as below:
w='w'
y1=(a^2-5*a+1-w^2+3*i*w)/(3*a^2+7*a-3*w^2+i*w)
conj=(3*a^2+7*a-3*w^2-i*w)
y1_new=((a^2-5*a+1-w^2+3*i*w)*conj)/((3*a^2+7*a-3*w^2+i*w)*conj)
when I peformed with Matlab, the results were not as expected in which I need to remain the variable a & w. Actually, I'm not sure how to perform separate real & imaginary parts using Matlab.
Could someone help me to advise 1) the appropriate method to separate the real & imaginary parts. 2) How to perform the dy1_new/dw from y1_new.
Finally I should get the value of 'a' and 'w' after answered the questions in 1) and 2).
Thank you very much