问题
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