plotting complex exponential function

74 views (last 30 days)
EDEN
EDEN on 29 Nov 2020
Commented: EDEN on 29 Nov 2020
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.

Accepted Answer

VBBV
VBBV on 29 Nov 2020
t = 5:-0.1:0 ;
y = 1*exp(-i*20*pi * t) + (4*exp(i*20*pi *t ) );
plot(t,real(y))
  5 Comments
VBBV
VBBV on 29 Nov 2020
Edited: VBBV on 29 Nov 2020
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 on 29 Nov 2020
Thank you so much brother, i do really appreciate.

Sign in to comment.

More Answers (1)

James Tursa
James Tursa on 29 Nov 2020
Edited: James Tursa on 29 Nov 2020
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.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!