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

Illustration
Samantha - 2020-12-21T10:35:42+00:00
Question: How to change frequency unit in plot of viewGoal function without using right click and properties dialog?

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.

Expert Answer

Profile picture of Neeta Dsouza Neeta Dsouza answered . 2025-11-20

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


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!