如何在LTIview中添加其他标题? [英] How to add a different title to LTIview?

查看:125
本文介绍了如何在LTIview中添加其他标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不同条件下(例如欠阻尼,临界阻尼条件等)使用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中添加其他标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆