Subplots in Matlab 2017
古いコメントを表示
Hi Everyone,
Having struggles with using subplot function. I tried learning from the very basics and tried out this simple code I found on internet
x = 0:5;
y = sin(x);
z = log(y);
subplot(2,2,1);
plot(x,y);
subplot(2,2,3);
plot(y,z);
subplot(2,2,4);
plot(x,z);
but this is giving me a index exceeds matrix dimensions error. What could be wrong?
回答 (1 件)
Walter Roberson
2017 年 7 月 12 日
1 投票
That code has problems with plotting imaginary values, but no problem with index exceeding matrix dimensions.
However, it is possible that you have previously made an assignment to a variable named "sin" or "log" or "subplot" or "plot"
カテゴリ
ヘルプ センター および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!