MATLAB Answers

0

How to change frequency unit in plot of viewGoal function without using right click and properties dialog?

Asked by Robert U. on 24 Oct 2018
Latest activity Commented on by Robert U. on 29 Oct 2018
Hi there,
does anyone know how to change the frequency unit in the plot generate by the viewGoal() function, e.g. for a tuning goal like TuningGoal.Tracking, without doing a right click and using the properties dialog? The default option is rad/second, but I'd like to have Hz as default. Is there a command I can use in my script calling the viewGoal() function to set the frequency unit automatically to Hz? Is seems there is not "plotoptions" like bodeplot has.
Best regards, Robert

  0 Comments

Sign in to comment.

Products


Release

R2018b

1 Answer

Answer by Arkadiy Turevskiy on 29 Oct 2018
Edited by Arkadiy Turevskiy on 29 Oct 2018
 Accepted Answer

Hi,
Try this:
gmax = frd([1 1 0.01],[0 1 100]);
Req = TuningGoal.MaxGain('du','u',gmax);
viewGoal(Req);
h=gcr;
setoptions(h,'FreqUnits','Hz');
Hope this helps.
Arkadiy Turevskiy
MathWorks

  1 Comment

Sign in to comment.