i want to plot this without ignoring the img parts, what should i do ?

조회 수: 1 (최근 30일)
M Gabry
M Gabry 2016년 12월 16일
댓글: Walter Roberson 2016년 12월 16일
for i=1:7;
k=[-3:1:3];
w=2;
t=1:.01:5;
ak=1+k(i)*1i;
X=ak*exp(k(i)*w*t*1i);
figure(1);subplot(4,2,i);
figure(1);plot(t,X);
end

답변 (1개)

José-Luis
José-Luis 2016년 12월 16일
편집: José-Luis 2016년 12월 16일
There's some spurious looping in your code. You might want to look into that. But that's another question. To answer what you specifically asked change:
plot(t,X);
to:
plot3(t,real(X),imag(X));
  댓글 수: 1
Walter Roberson
Walter Roberson 2016년 12월 16일
plot3() like that is probably the best answer if t must be represented. However, sometimes what is wanted in such a situation is instead
plot(real(X), imag(X))
which you can abbreviate as
plot(X)
when X is known to have imaginary components.

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

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by