Command stem for the mass spring damper system

조회 수: 2 (최근 30일)
Silas Teixeira
Silas Teixeira 2014년 2월 27일
댓글: Silas Teixeira 2014년 2월 27일
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
Anuj
Anuj 2014년 2월 27일
what do you want to do with stem command? Stem is a command to plot discrete data, do you want discrete plot of step response ?
Silas Teixeira
Silas Teixeira 2014년 2월 27일
yes Anuj... could you help me? Can I plot something else with this command?

댓글을 달려면 로그인하십시오.

답변 (1개)

Anuj
Anuj 2014년 2월 27일
You can simply do
stem(step(sys))
you can read the documentation about it. there is nice explanation about the command. for that, type
doc stem
regards

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by