how can i plot graph one above another with same X-axis and changing Y-axis(attaching a rough model i need)

조회 수: 2 (최근 30일)
i want to plot one above another. X-axis scale is constant, but Y-axis changing..

답변 (1개)

Wayne King
Wayne King 2014년 2월 20일
편집: Wayne King 2014년 2월 20일
X = randn(100,3);
X(:,2) = X(:,2)+10;
X(:,3) = X(:,3)+20;
subplot(311)
plot(X(:,1));
ax1 = gca;
set(ax1,'xtick',[]);
set(ax1,'xcolor','white')
subplot(312);
plot(X(:,2));
ax2 = gca;
set(ax2,'xtick',[]);
set(ax2,'xcolor','white')
subplot(313);
plot(X(:,3));
  댓글 수: 1
chaman lal dewangan
chaman lal dewangan 2017년 12월 12일
편집: chaman lal dewangan 2017년 12월 12일
Answer is subplot function in matlab. Following link answers clearly. https://in.mathworks.com/help/matlab/ref/subplot.html

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by