Characteristics of a step response plot

11 次查看(过去 30 天)
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?

回答(1 个)

Star Strider
Star Strider 2021-5-8
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!

Translated by