matlab绘制函数突袭,Matlab绘图初级教程

01PLOT函数使用

PLOT( )

Plot(x,y),横轴为x,纵轴为y。

Plot(y),横轴就为1,2,3,4....

PLOT()

Plot(x,y), the horizontal axis is x, and the vertical axis is y.

Plot(y), the horizontal axis is 1, 2, 3, 4....

执行两行命令时

When executing two lines of commands

可以看出只有第二行命令sin函数的图

You can see that only the second line of the command sin function

这是因为matlab绘图会自动将前面图形的命令删掉,这时要用hold on指令,就不会自动覆盖前面的图形

This is because matlab drawing will automatically delete the commands of the previous graphics. At this time, use the hold on command, and the previous graphics will not be automatically refreshed.

hold on命令执行后,呈现了两行命令的图形

After the hold on command is executed, two lines of commands are displayed

02图形特征的修改

PLOT(x,y,'str')

'str'可设置图形的标志、线条形状以及颜色。

PLOT(x,y,'str')

'str' can set the graphic logo, line shape and color.

例1

例2

03图标标注

Legend('该函数图像' )

Legend('The function image')

04title和label的使用

Title(该图的名称 )

Xlabel(x轴的意义 )

Ylabel(y轴的意义 )

Zlabel(z轴的意义 )

Title (the name of the figure)

Xlabel (the meaning of x axis)

Ylabel (meaning of the y axis)

Zlabel (the meaning of z axis)

参考资料:谷歌翻译、B站

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值