I have such a code;
figure;
for a = 1:length(weekM')
tday_cell = day_cell(week_cell == weekM(a));
for b = 1:length(days)
subplot(length(weekM'), 7, b);
if strcmp(first_entranceM{a, b}, '0')
plot(peaks);
l = [l; 0];
else
tms_cell = ms_cell(week_cell == weekM(a));
ttms_cell = tms_cell(strcmp(tday_cell,days{b}));
l = [l; ttms_cell];
plot(ttms_cell);
end
end
end
I want to plot graphs with subplot function as subplot(3,7,[1:2:3...])
. That is, I want to plot graph which has 3 lines, and 7 graphs on each line.
But in my case, it only shows the last line on the first line, and I can't see the remaining graphs.
I'm sure that the data to plot previous graphs are not being lost, but I don't understand why there are missing graphs.
Could you help me to fix this problem?