Disagreement between step function and stepinfo function.
9 views (last 30 days)
I'm having problems with the step and stepinfo functions in MATLAB. I've been able to get the step function to produce a plot of my transfer function and the stepinfo to give me the relevant data. However, when I compare my graph and the info outputted by the stepinfo function the two don't seem to match up at all. The settling time is much higher then it appears it should be according to the graph for example. Any ideas what could be happening? I'll include part of my code here:
t=0:.1:20; X1 = (P1*C)/(P1*C-1); figure(3) step(X1,t) Q = stepinfo(X1)
where P1 and C are transfer functions specified earlier in my code.
Thanks for any help you can give, Miles
Jarrod Rivituso on 1 May 2011
Does the step function give ok results if you don't add t as a second argument? I ask because the spacing of your t vector may be too coarse based on the dynamics of your system.
Here's an obvious example that illustrates the breakdown I am referring to
%Create simple system
sys = tf(1,[1 2 1])
%Get numeric step response info
%Get step response plot (matches stepinfo well)
%Get step response plot sampled every 8 seconds (doesn't match stepinfo well)