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일

0 개 추천

t = 5:-0.1:0 ;
y = 1*exp(-i*20*pi * t) + (4*exp(i*20*pi *t ) );
plot(t,real(y))

댓글 수: 5

EDEN
EDEN 2020년 11월 29일
how will the output look?
can u share it here
EDEN
EDEN 2020년 11월 29일
i am getting a constant y if i use the code u made bro.
VBBV
VBBV 2020년 11월 29일
편집: VBBV 2020년 11월 29일
t = 5:-0.01:0 ;
for i = 1:length(t)
y(i) = 1*exp(-i*0.2*pi * t(i)) + (0.44*exp(i*0.2*pi *t(i) ) );
end
plot(t,real(y))
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일

0 개 추천

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.

카테고리

도움말 센터File Exchange에서 Graph and Network Algorithms에 대해 자세히 알아보기

질문:

2020년 11월 29일

댓글:

2020년 11월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by