How to use "Variable Names" from "Import Data" UI in the legend of a plot?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
dbmn
am 17 Feb. 2017
Something like this?
a = uiimport('test.csv');
plot(rand(10, 6));
legend(a.colheaders);
0 Kommentare
Siehe auch
Kategorien
Mehr zu Legend finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!