how to plot cell array in a for loop?
이전 댓글 표시
Dear all
I have a 5*12 cell arrey.
I make a for loop to plot 5 rows on top of each other by the following for loop:
figure();
for i=1:5
scatter(a{i,1});
%qqplot(biascorrected_P_RCM{i,1},DailyRes_PT_nonZero{1,1}(:,1));
hold on
end
But I want to have seperate plots ofr each of this 12 column. of course I can write one by one seperately but I want to have nested for loops
for i=1:12
for j=1:5
end
end
how can I have 12 plots in which each 5 rows have been plotd on top of each other?
답변 (1개)
KSSV
2020년 6월 7일
figure
hold on
for i=1:12
for j=1:5
scatter(a{j,i})
end
end
댓글 수: 8
frankovaT
2020년 6월 7일
KSSV
2020년 6월 7일
for i=1:12
figure(i)
hold on
for j=1:5
scatter(a{j,i})
end
end
frankovaT
2020년 6월 7일
KSSV
2020년 6월 7일
How did you plot th previous figure with out error? Attach your data.
frankovaT
2020년 6월 7일
KSSV
2020년 6월 7일
load("a.mat") ;
[m,n] = size(a) ;
for i=1:n
figure(i)
hold on
for j=1:m
plot(a{j,i})
end
end
The above gave me 12 plots.
frankovaT
2020년 6월 7일
frankovaT
2020년 6월 7일
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
