Lable in a for loop (subplots)
조회 수: 1 (최근 30일)
이전 댓글 표시
I have many subplots produced by a for loop and want to label them on the y-axis via ylabel. The code looks like this:
for m=1:n
subplot...
ylabel (...)
end
Is it possible to name each subplot with the letter M and the number from the for loop, n? So that I have M1, M2, M3,... Mn on the y-axis.
Thanks!
댓글 수: 0
채택된 답변
Image Analyst
2014년 7월 6일
for m=1:n
subplot...
mLabel = sprintf('M%d', m);
ylabel(mLabel, 'FontSize', 15);
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!