i want to plot this without ignoring the img parts, what should i do ?
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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
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 Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!