Change the output Y-labels in a figure of a multi-output dynamic system

조회 수: 6 (최근 30일)
thomas michiels
thomas michiels 2018년 12월 15일
댓글: maffew 2020년 2월 29일
Vraag 3a versie 1.jpg
I don't know how I can change the names of the Y-labels out(1), out(2), out(3) and out(4) in this multiplot figure...
  댓글 수: 1
maffew
maffew 2020년 2월 29일
You could either throw these into multiple plots with step(sys(1))
OR
You could use subplots. For example,
figure
subplot(2,1,1)
step(sys(1))
ylabel('Output 1')
subplot(2,1,2)
step(sys(2))
ylabel('Output 2')
Unfortunately, you lose the larger label. There's a number of options for that. Looks like someone made a thing, https://www.mathworks.com/matlabcentral/fileexchange/7772-suplabel

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

답변 (1개)

madhan ravi
madhan ravi 2018년 12월 15일
편집: madhan ravi 2018년 12월 15일
ylabel(...) after each subplot
  댓글 수: 1
thomas michiels
thomas michiels 2018년 12월 15일
편집: thomas michiels 2018년 12월 15일
That is what I would normally do, but I came to this figure as the 4-way output of a dynamic system with the following code:
f=1200;
A=[0 1 0 0;-k/m1 -(b+c)/m1 k/m1 c/m1;0 0 0 1;k/m2 c/m2 -k/m2 -c/m2];
B=[0;f/m1;0;0];
C=[1 0 0 0;0 1 0 0;0 0 1 0;0 0 0 1];
D=[0;0;0;0];
sys=ss(A,B,C,D);
figure(1)
t1=0:1:900;
step(sys,t1);
[y,t1]=step(sys,t1);
So the subplots are not defined in my previous code.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by