我想在不同条件下(例如欠阻尼,临界阻尼条件等)使用LTIview绘制二阶传递函数的阶跃响应.我想在同一matlab程序中绘制它们的图,因此要给出自己的标题名称,例如阻尼不足的情况.但是以下用于plot函数的代码不起作用,并且GUI提供了预初始化的名称
I want to plot step response of a second order transfer function using LTIview in different conditions such as underdamped,critically damped condition etc. I want to plot them in the same matlab program so want to give my own title names such as 'underdamped' condition. But the following code for plot function doesn't work and the GUI gives the preinitialised names
figure,ltiview('step',trf),title('underdmp')或
ltiview('step',trf),title('overdamped')如何解决这个问题?并根据我的选择给出名称?
How to solve this problem? And give the names according to my choice?
推荐答案为了在标准工具箱窗口中对图的标题属性进行总括化,您需要检索图形的轴对象.
In order to costomize the title property of a plot in a standard toolbox window, you need to retrieve the axes object of the figure.
以下代码使用lti示例显示解决方案:
The following code uses lti examples to show the solution:
load ltiexamples; H = ltiview(sys_dc); obj = findobj(H, 'type', 'axes'); title(obj, 'my name here');这是结果:
编辑
伯德图由两个图组成,分别由两个轴对象组成.因此,您需要放置一个对象索引以访问轴对象.
A Bode plot consists of two plots and respectively of two axes-objects. So you need to put an object index to access the axes object.
load ltiexamples; H = ltiview('bode', sys_dc); obj = findobj(H, 'type', 'axes'); title(obj(1), 'Custom title for the bode plot');
更多推荐
如何在LTIview中添加其他标题?
发布评论