how to give ylabel desired label automatically in loop subplots???

조회 수: 1 (최근 30일)
hello all, I have this little problem in which for the given coding below i want that the graph to be plotted should have c1, c2, c3, c4, c5, c6 labelling instead of 'C' automatically.
SCRIPT IS:
figure
for i=1:6
subplot(6,1,i)
plot (sin(1:100)*10^(i-1))
ylabel('C','Fontname','Times new roman','FontSize',10,'fontweight','b')
end
THANX..... FOR THE ATTTENTION... WAITING FOR REPLY SOON

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 5월 19일
편집: Azzi Abdelmalek 2013년 5월 19일
figure
for i=1:6
subplot(6,1,i)
plot (sin(1:100)*10^(i-1))
y_titre=sprintf('c%d',i)
ylabel(y_titre,'Fontname','Times new roman','FontSize',10,'fontweight','b')
end
  댓글 수: 1
amrinder
amrinder 2013년 6월 10일
Sir, thanx for the answer u provided onto above question some weeks before. Can u tell me corresponding to same question, if i want to give now overall label also in y axis (besides those c1, c2, c3... remaining as it is), how can it be done??
i m sorry i hvnt voted for u that time coz i dnt know that it counts... now it ll not happen again.. thanx

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

amrinder
amrinder 2013년 5월 19일
thanx.. i got the desired result..

카테고리

Help CenterFile Exchange에서 Subplots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by