I want to plot exponential signal that is euler formula exp(i*pi) in MATLAB but output figure is empty and does not shows graph as shown in attached, even i tried plotting simpler version, i mean
exp(i*pi),but still figure was empty

댓글 수: 1

There is an example of plotting exponentials in the documentation here, see the sub heading Plot Exponential Function. If you're trying to observe a single point on the plot you could also write
plot(y,'or')

댓글을 달려면 로그인하십시오.

 채택된 답변

Star Strider
Star Strider 2020년 2월 18일

0 개 추천

The plot function plots lines between points. You have only one point, so if you change the plot call to:
y = exp(100*i*pi)
figure
plot(y,'p')
plots a star at (1,0).

댓글 수: 4

ABTJ
ABTJ 2020년 2월 18일
Your current answer is okay. If comfortable for you,Please edit it to adjust for updated question that is plotting euler formula
If you mean the Euler identity :
y = exp(100*i*pi)
y = cos(100*pi)+j*sin(100*pi)
with both producing:
y =
1.0000e+000 + 1.9644e-015i
y =
1.0000e+000 + 1.9644e-015i
That is the best I can do with the information I have.
ABTJ
ABTJ 2020년 2월 19일
But still in this case we are getting only one point at (1,0). How we can see ful wave/plot of euler identity for atlest one period??
Add a time-varying vector:
t = linspace(0,2);
y = exp(100*i*pi*t)
y = cos(100*pi*t)+j*sin(100*pi*t);
and now the results will go from 0 to .
To see it:
figure
plot(t, real(y), t, imag(y))
grid
The two ‘y’ vectors are the same, so this works for either one of them.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

KSSV
KSSV 2020년 2월 18일
편집: KSSV 2020년 2월 18일

0 개 추천

i = linspace(0,1,100) ;
y = exp(100*i*pi) ;
plot(i,y)

카테고리

도움말 센터File Exchange에서 Mathematics에 대해 자세히 알아보기

제품

릴리스

R2015a

질문:

2020년 2월 18일

댓글:

2020년 2월 19일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by