フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to use subplot within two loops

1 回表示 (過去 30 日間)
Hinde essmahi BOUZIANE
Hinde essmahi BOUZIANE 2019 年 8 月 8 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I need one figure with multiple graphs within two loops.
for i=1:length(state)
[block]
for j=1:length(channel)
[block]
subplot(length(state),length(channel)),j)
plot(a,b)% a and b are arrays of doubles.
end
end
I want one figure with size =length(state)*length(channel); for instance I need all the graphs of state(1)within all channels in the first row etc...
But what I get is multiple figures (the lenght of state).

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019 年 8 月 8 日
編集済み: KALYAN ACHARJYA 2019 年 8 月 8 日
Extra parenthesis here ...
subplot(length(state),length(channel)),j)
%....................................^
Try
l=1;
for....
for..
.....
subplot(length(state),length(channel),l)
plot(a,b) % a and b are arrays of doubles.
l=l+1;
end
end
  1 件のコメント
madhan ravi
madhan ravi 2019 年 8 月 8 日
You mean parenthesis.

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by