plot a cell array
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Anastasia Anastasiadou
am 30 Jan. 2019
Kommentiert: Anastasia Anastasiadou
am 30 Jan. 2019
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 ![plot.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202123/plot.png)
![plot.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/202123/plot.png)
0 Kommentare
Antworten (1)
Guillaume
am 30 Jan. 2019
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');
Siehe auch
Kategorien
Mehr zu Data Distribution Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!