complex number representation as real and imaginary part
Ältere Kommentare anzeigen
syms x real
syms t real
e=cos(x)+1i*sin(x)
real(e)
u=(cos(x)+1i*sin(x))/((1+((1/(0.1)^4)-1)*(cos(4*t)+1i*sin(4*t))))
v=sym(((1/(0.1)^4)-1))*(cos(4*x)+1i*sin(4*x))
m1=real(u)
m2=(m1)^(1/4)
x=0.5:0.5:5
t=1
% mu=0.1
row=0
for i=1:length(x)
row=row+1
col=0
for j=1:length(t)
col=col+1
u(row,col)=m2(x(i),t(j));
end
end
The above code shows error when I put the power (1/4) on the denominator of u=(cos(x)+1i*sin(x))/((1+((1/(0.1)^4)-1)*(cos(4*t)+1i*sin(4*t)))) . I dont get it why it is so ? So I find the real part separtely and find the real part . But now again the problem with the for loop why the error is there ? But is the option for that
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu LaTeX finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!