Disagreement between step function and stepinfo function.
6 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
Jarrod Rivituso
2011-5-1
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
stepinfo(sys)
%Get step response plot (matches stepinfo well)
step(sys)
%Get step response plot sampled every 8 seconds (doesn't match stepinfo well)
step(sys,0:8:24)
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!