Could someone explain the meaning of this step function for me
Show older comments
Hi, I have obtained a code for simulating car suspension system using a LTI system x' = Ax + Bu, y = Cx+Du
m1 = 10;
m2 = 350;
kw = 500000;
ks = 10000;
Bb = [1000, 2000, 3000, 4000];
t = 0:0.1:2;
for i = 1:4
b = Bb(i);
A = [0 1 0 0; -(ks/m1+kw/m1) -b/m1 ks/m1 b/m1; 0 0 0 1; ks/m2 b/m2 -ks/m2 -b/m2];
B = [ 0; kw/m1; 0; 0];
C = [1 0 0 0; 0 0 1 0];
D = 0;
y = step(A,B,C,D,1,t); %Why is 1,t added?
subplot(2,2,i);
plot(t,y(:,1), ':', t, y(:,2), '-');
legend('Wheel', 'Car');
ttl = sprintf('Response with b = %4.1f' ,b);
title(ttl);
end
Can someone quickly explain to me why the step function is written in the way it is? Especially the part about the inclusion of 1 and t indices.
Accepted Answer
More Answers (0)
Categories
Find more on Power and Energy Systems in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!