How to use "Variable Names" from "Import Data" UI in the legend of a plot?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi
In using the "Import Data" UI, there's a field that's called "Variable Names Row". I tell it the row that labels the columns of my data. In matlab (2016b), I plot the data and then have it put a legend on the plot. I'd like it to use the Variable Names from the Import Data tool. Is there a way to do this? Thanks...
댓글 수: 0
답변 (1개)
dbmn
2017년 2월 17일
Something like this?
a = uiimport('test.csv');
plot(rand(10, 6));
legend(a.colheaders);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Legend에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!