How do add a variable in a plot title
조회 수: 7 (최근 30일)
이전 댓글 표시
I have a string called names:
names = {'X4' 'X5' 'X10' 'X13' 'X25' 'X311'};
And I would like my plot title to read
Sample number X5 in experiment
X5 being names(2). How do I insert this into:
title('Sample number __ in experiment')
the underscore being names(2)
댓글 수: 0
답변 (1개)
Star Strider
2014년 6월 19일
names = {'X4' 'X5' 'X10' 'X13' 'X25' 'X311'};
k1 = 2;
title(sprintf('Sample number %s in experiment',names{k1}))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Title에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!