i want to solve 1 dof differential equation by using ss and lsim for just as an example.
probrem is the result calculated by ss&lsim and the result calcuated by matmatically analitically caliculation are different.
do you know why this things happen? if my code has some mistake, I want to know where is prob.
A=[0 1; -K/M -C/M];
y = lsim(sys,u,t);
legend('u:input','y:sys solution','x: analitical solution')