Characteristics of a step response plot

8 views (last 30 days)
shamsa alb
shamsa alb on 8 May 2021
Answered: Star Strider on 8 May 2021
hello!
I'm tryin to see the charactristice (Rise time, Percent Overshoot, Peak value and Peak time) of my plot response on the plot itself, I already have the properties from the command "stepinfo" but i want the charactristics to appear on the plot itself. i tried to right click but i don't have a "charactristics" thing showing there, is there any way to let the proporties show?

Answers (1)

Star Strider
Star Strider on 8 May 2021
Try something like this (using a transfer function from the documentation) —
sys = tf([1 5 5],[1 1.65 5 6.5 2]);
stinf = stepinfo(sys);
stinft = struct2table(stinf);
VarNm = stinft.Properties.VariableNames;
Vals = stinft{1,:};
VarNms = string(VarNm);
figure
step(sys)
text(mean(xlim), min(ylim)+mean(ylim)*0.1, compose('%s = %7.3f', [string(VarNm); Vals].'), 'Horiz','left','Vert','bottom', 'Interpreter','latex' )
.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!