Hi I'm trying to plot using a for loop. don't see syntax errors but plot comes out empty. appreciate your guidance.
显示 更早的评论
for t = 0:30/100:30
y1 = 6*exp(-0.2)*t*sin(7*t+3);
y2 = 4*exp(-0.1)*t*sin(3*t-1);
end
plot(y1,t);
hold on;
plot(y2,t);
hold off;
legend ('y1(t)=6e^-0.2tsin(7t+3)','y2(t)=4e^-0.1tsin(3t-1)');
axis([0 30 -6 6])
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

