matlab绘图基础

这篇博客详细介绍了如何使用MATLAB进行各种图形绘制,包括正弦、指数函数曲线图,平方乘以正弦函数的图形,自定义线型、颜色和标记的散点图,以及对数坐标轴和等比例坐标轴的设置。此外,还展示了如何保存图形为PDF格式。
摘要由CSDN通过智能技术生成

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 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值