フィルターのクリア

Strange behavior with subplot command: plots only the last plot

3 ビュー (過去 30 日間)
amg
amg 2015 年 4 月 8 日
編集済み: Star Strider 2015 年 4 月 8 日
I'm trying to plot subplots, but the command only produces a single plot (the very last one) in a single figure window. I've run code for subplots that was previously working fine only to have the same problem.
To troubleshoot, I also ran the code on Matlab's documentation page for subplot (below), and again it produces just a single plot, the last one, taking up the entire figure. What's going on and is there a way to fix it?
Code from Matlab documentation page:
x = linspace(0,10);
y1 = sin(x);
y2 = sin(5*x);
figure
subplot(2,1,1);
plot(x,y1)
subplot(2,1,2);
plot(x,y2)
(I use Matlab 2014a on a Mac.)

回答 (0 件)

カテゴリ

Help Center および File ExchangeSubplots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by