English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i am using matlab program to plot the equ e^(ix) = cos x + i sin x ?
but the left side graph is not eqval to right side.

function esinx()
x = 0;
for i = 1:1000
e(i) = exp(x);
sinw(i) = sin(x);
esin(i) = exp(x) * sin(x);
x = x + 0.01;
end
subplot(3,1,1); plot(e);
subplot(3,1,2); plot(sinw);
subplot(3,1,3); plot(esin);
%end

2006-12-22 00:33:57 · 5 answers · asked by Sathish 1 in Science & Mathematics Mathematics

5 answers

Your plot should wind up being a circle with the horizontal being the real axis and the vertical being the complex. The radius is one.

http://en.wikipedia.org/wiki/Euler's_identity

2006-12-22 01:22:26 · answer #1 · answered by Gene 7 · 0 1

I don't have access to my math proggies right now, but a thought came to mind, and you probably already thought of this, but it's an easy oversight.....are you sure you're looking at the same scales on each plot?

2006-12-22 08:55:45 · answer #2 · answered by Anonymous · 0 0

Think of it as a wave with wavelength of 1.
The projection on the real axis is cosine and on the imaginary is sinus.

2006-12-22 11:43:27 · answer #3 · answered by Boehme, J 2 · 0 0

kid, just draw a full circle of radius 1

2006-12-22 12:02:53 · answer #4 · answered by Anonymous · 0 0

in this case i is not a varible. it is sqrt of -1

2006-12-22 09:05:36 · answer #5 · answered by Mein Hoon Na 7 · 0 0

fedest.com, questions and answers