a legend from a sting array
조회 수: 18 (최근 30일)
이전 댓글 표시
I have a string array with a unknown number of cells in a row. How can I make a legend of them? Every 2D line one cell.
댓글 수: 1
답변 (1개)
KSSV
2018년 4월 17일
str{1} = 'one' ;
str{2} = 'two' ;
str{3} = 'three' ;
figure
hold on
for i = 1:3
plot(rand(10,1)) ;
end
legend(str)
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!