MATLAB Answers

Multiple plots not working on the simulink spring mass model

조회 수: 2(최근 30일)
R Abhinandan
R Abhinandan 2021년 9월 2일
댓글: Fangjun Jiang 2021년 9월 2일
In this pdf, page number 39, exericse 2 i tried implementing the same code using the same method but my output graph is like this. I have attachted my simulink file.
%for plotting graph
plot(out.t,out.x)
hold on
B = 8;
sim('second')
plot(out.t,out.x)
B=12;
sim('second')
plot(out.t,out.x)
B = 25;
sim('second')
plot(out.t,out.x)
hold off
%parameters
M=2; %kg
K= 16; %N/m
B=4; % Ns/m

답변(1개)

Fangjun Jiang
Fangjun Jiang 2021년 9월 2일
  댓글 수: 4
Fangjun Jiang
Fangjun Jiang 2021년 9월 2일
Figure out what variable is your saved output. It could depend on your configuration setting, signal logging or ToWorkspace block.

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

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by