How can i create two subplot
47 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am using a for loop which is giving me 16 plots. I want to put 8 in one subplot and the remaining 8 in the subplot 2. i am using the following code:
models{ct} = arx(ze1,[[na1_ na2_] [nb1_ nb2_] nk]);
if ct<10
figure(1)
s(1)=subplot(3,3,ct)
else
figure(2)
s(2)=subplot(3,3,ct)
end
unfortunately after putting 3 plots in subplot 1, matlab is giving me the following error:
"Error using subplot (line 327)
Index exceeds number of subplots"
how can i generate two subplots with 8 plot in each of them.
thanks
1 Kommentar
Lesley Chingwena
am 1 Mai 2022
Hello, did you manage to find a solution for this? I am also trying to do something similar.
Antworten (1)
KALYAN ACHARJYA
am 24 Mär. 2019
% Figure 1
figure(1);
subplot(121), plot(test1);
subplot(122), plot(test2);
% Figure 2
figure(2);
subplot(121), plot(test3);
subplot(122), plot(test4);
%Please changes as per your requirements
0 Kommentare
Siehe auch
Kategorien
Mehr zu Subplots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!