Error using subplot, undefined function or variable
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
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
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
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!