plotting complex exponential function

114 ビュー (過去 30 日間)
EDEN
EDEN 2020 年 11 月 29 日
コメント済み: EDEN 2020 年 11 月 29 日
Hi friends,
I am tring to plot the graph of
y = (1*e^-i20*pi * t) + (4*e^i20*pi *t ) where t= 5:-0.1:0
can you please help me in this case.
thank you.

採用された回答

VBBV
VBBV 2020 年 11 月 29 日
t = 5:-0.1:0 ;
y = 1*exp(-i*20*pi * t) + (4*exp(i*20*pi *t ) );
plot(t,real(y))
  5 件のコメント
VBBV
VBBV 2020 年 11 月 29 日
編集済み: VBBV 2020 年 11 月 29 日
t = 5:-0.01:0 ;
%for i = 1:length(t)
y = 1*exp(-i*0.2*pi.*t) + (0.44*exp(i*0.2*pi.*t ) );
plot(t,real(y),'linewidth',2)
Here's what i get
EDEN
EDEN 2020 年 11 月 29 日
Thank you so much brother, i do really appreciate.

サインインしてコメントする。

その他の回答 (1 件)

James Tursa
James Tursa 2020 年 11 月 29 日
編集済み: James Tursa 2020 年 11 月 29 日
E.g., maybe this is what you need
y = 1*exp( -i20 *pi * t ) + 4*exp( i20 * pi * t );
plot(t,y);
Although it is not clear what i20 is. A variable name? Or is this supposed to be i*20? In which case you might want to plot real(y) instead of y.
  1 件のコメント
EDEN
EDEN 2020 年 11 月 29 日
i20 is 20 with the imaginary i

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by