how to plot euler formula in matlab?

75 ビュー (過去 30 日間)
ABTJ
ABTJ 2020 年 2 月 18 日
コメント済み: Star Strider 2020 年 2 月 19 日
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 件のコメント
Turlough Hughes
Turlough Hughes 2020 年 2 月 18 日
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 日
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 月 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??
Star Strider
Star Strider 2020 年 2 月 19 日
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 日
i = linspace(0,1,100) ;
y = exp(100*i*pi) ;
plot(i,y)

カテゴリ

Help Center および File ExchangeSpectral Measurements についてさらに検索

製品


リリース

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by