plot a cell array
조회 수: 5 (최근 30일)
이전 댓글 표시
hello , can you please help me about plotting a cell array and use the 1st column as a nae for each line ? for example my cell is this 

댓글 수: 0
답변 (1개)
Guillaume
2019년 1월 30일
Assuming that nae means name and that's what you want the legend to show for each row:
hlines = plot(cell2mat(yourcellarray(:, 2:end))'); %have to transpose as plot plots columns
[hlines.DisplayName] = yourcellarray{:, 1};
legend('show');
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!