x = 0:0.1:2*pi; y1 = sin(x); y2 = exp(-x);
plot(x, y1, '--*', x, y2, ':o');
xlabel('t = 0 to 2\pi');
ylabel('values of sin(t) and e^{-x}')
title('Function Plots of sin(t) and e^{-x}');
legend('sin(t)','e^{-x}');
%%
x = linspace(0,3); y = x.^2.*sin(x);
plot(x,y);
xlabel('t = 0 to 3');
ylabel('values of x^2*sinx')
title('Function Plots of sin(t)*x^2');
xlabel('t = 0 to 2\pi');
ylabel('values of sin(t) and e^{-x}')
legend('sin(t)*x^2');
%%
x = linspace(0,2); y1 = x.^2;y2=sin(2.*pi.*x);
plot(x,y1 ,'--*', x, y2, ':o');
xlabel('time(ms)');
ylabel('f(x)')
title('Minni Assignment#1');
legend('x^2','sin(2\pi*x)');
%%
x = linspace(0, 2*pi, 1000); y
matlab绘图基础
最新推荐文章于 2021-04-10 13:31:52 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)