How to add a different title to LTIview?

好久不见. 提交于 2019-12-12 02:24:51

问题


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')

Or

ltiview('step',trf),title('overdamped')

How to solve this problem? And give the names according to my choice?


回答1:


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.

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');

Here is the result:

EDIT

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');



来源:https://stackoverflow.com/questions/34034776/how-to-add-a-different-title-to-ltiview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!