How to split plots?

조회 수: 24 (최근 30일)
Julia Kowalska
Julia Kowalska 2019년 1월 9일
댓글: Adam 2019년 1월 9일
hello, after the program is launched, one plot is displays, after clicking the space bar, the second graph is displayed instead of the first plot. How to seperate them to display in two different windows by using subplot?
t=t(M:Nx-M+1); f=fpr/(2*M)*(-M:M-1);
mesh(t,f,X); view(-40,70); axis tight;
xlabel('czas [s]'); ylabel('częstotliwość [Hz]'); pause
imagesc(t,f,X); xlabel('czas [s]'); ylabel('częstotliwość [Hz]'); pause
  댓글 수: 1
Adam
Adam 2019년 1월 9일
There's only one plot instruction in that code, but I'd have thought
doc subplot
explains its usage very clearly with examples? what part iof the help do you not understand?

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

답변 (1개)

madhan ravi
madhan ravi 2019년 1월 9일
t=t(M:Nx-M+1); f=fpr/(2*M)*(-M:M-1);
subplot(2,1,1)
mesh(t,f,X);
view(-40,70);
axis tight;
xlabel('czas [s]');
ylabel('częstotliwość [Hz]');
pause
subplot(2,1,2)
imagesc(t,f,X);
xlabel('czas [s]');
ylabel('częstotliwość [Hz]');
pause

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by