首页 > 编程知识 正文

matlab函数(matlab指令plot)

时间:2023-05-06 02:46:12 阅读:65160 作者:3270

manymatlabgraphicsfunctionscalltheobjectcreationfunctionstodrawgraphicsobjects.however,high-levelroutinesalsocleartheaxeaxexects

Matlab图像函数要求对象创建函数绘图图像对象,而高级函数通常同时清除坐标轴或创建新图像,具体取决于坐标轴的设置和图像的NextPlot属性。

In contrast,coreobjectcreationfunctionssimplycreatetheirrespectivegraphicsobjectsandplacetheminthecurrentparentobject.theydded

相反,核心对象创建函数只创建自己的图像对象,并将其放置在现有的父对象上,而不考虑图像的设置或坐标轴的属性。

在请求了For example,if you call theLinefunction,例如line函数的情况下

line () xdata、x、(YData )、y、(ZData )、z、(Color )、(r ) )

matlabdrawsaredlineinthecurrentaxesusingthespecifieddatavalues.ifthereisnoaxes,matlabcreatesone.ifthereisnofigurewindowigurew

Matlab用给定的数据在现有坐标系中绘制红线。 如果还没有坐标轴,则会创建。 即使还没有图像窗口,也会创建。

ifyoucallthelinefunctionasecondtime, matlabdrawsthesecondlineinthecurrentaxeswithouterasingthefirstline.thisbehaviorisdifferentfromhigh-levelfunctionslikeplotttion . youcanchangethebehaviorofhigh-levelfunctionsbyusingtheholdcommandorbychangingthesettingoftheaxesnextplotproperty。

但是! 如果你再次请求line函数,MATLAB在现有坐标上画一条线,我们刚才画的东西不会消失。 这与高级函数(如plot )不同,在第二个请求中,plot会删除刚才的图像,并重置坐标属性(Position和Units除外)。 可以通过更改HOLD命令或坐标的NEXTPLOT属性的设置来更改高级函数的行为。

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。