Error using subplot, undefined function or variable
이전 댓글 표시
I'm using in a wrong way subplots. I want to plot two matrices in the same figure using two subplots.
figure
subplot(2,1,1);
plot(valmedio,'DisplayName','valmedio')
set(gca,'XTick', [0,50,100,150,200,250,300]);
set(gca,'XTickLabel',[0,1000,2000,3000,4000,5000,6000]);
legend('Location','northwest')
grid minor
title('Plot valmedio 0 ÷ 6 Km.')
sublpot(2,1,2);
plot(valmedio(1:30,:),'DisplayName','valmedio')
set(gca,'XTick', [0,5,10,15,20,25]);
set(gca,'XTickLabel',[0,100,200,300,400,500,600]);
legend('Location','northwest')
grid minor
title('Plot valmedio 0 ÷ 600 m.')
댓글 수: 3
Walter Roberson
2018년 3월 14일
What shows up for
which -all subplot
Jan
2018년 3월 20일
@Ana: If you open a FIG file in R2017a and save the GUI afterwards, it might not open in earlier versions anymore. The dialogs created by GUIDE are not compatible with other Matlab versions.
Rik
2018년 3월 20일
Also, ishg2parent seems to be undocumented (about the only hits on Google are from Yair Altman, there is no reference to this function in the release notes, and my R2017b doesn't recognize that function either).
It might also be an internal function somewhere buried deep, as it looks like it is a subfunction of legend in R2014b, but in my copy it is no longer there.
답변 (1개)
Alok Nimrani
2018년 3월 27일
0 개 추천
Hi Dario,
The reason for the error is the function ‘subplot()’ being spelled incorrectly as SUBLPOT in line 10. On correcting this function call, I am getting two subplots in the output figure.
Hope this helps.
Thanks
카테고리
도움말 센터 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!