plot a cell array

2 visualizaciones (últimos 30 días)
Anastasia Anastasiadou
Anastasia Anastasiadou el 30 de En. de 2019
Comentada: Anastasia Anastasiadou el 30 de En. de 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

Respuestas (1)

Guillaume
Guillaume el 30 de En. de 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');
  1 comentario
Anastasia Anastasiadou
Anastasia Anastasiadou el 30 de En. de 2019
thank you so much ! it worked!

Iniciar sesión para comentar.

Categorías

Más información sobre Data Distribution Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by