Does anybody here could help me to use the command "stem" for the mass-spring-damper system? I have some equations like:
equation := ode({m*x''(t) + c*x'(t) + k*x(t), x(0) = 0 , x'(0) = 1}, x(t))
where: m = mass, c = dampering constant , k = spring constant
or using Laplace
num = 1;
den = [m c k];
step = (num,den)
or using state-space model above using the ss function in MATLAB
A = [0 1; -k/m -c/m];
B = [0; 1/m];
C = [1 0];
D = [0];
sys = ss(A, B, C, D)
step(sys)
2 Comments
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/119443-command-stem-for-the-mass-spring-damper-system#comment_198969
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/119443-command-stem-for-the-mass-spring-damper-system#comment_198969
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/119443-command-stem-for-the-mass-spring-damper-system#comment_198976
Direct link to this comment
https://ch.mathworks.com/matlabcentral/answers/119443-command-stem-for-the-mass-spring-damper-system#comment_198976
Sign in to comment.