How can I plot multiple graphs from a name column (from Excel)

I want to plot multiple graphs from a 3-column spreadsheet from Excel.
Data is in this format:
(name); (x-value); (y-value);
ab-1 (~ 15 rows); x; y;
ab-2 (~ 15 rows); x; y;
ab-3 (~ 15 rows); x; y;
bc-1 (~ 15 rows); x; y;
bc-2 (~ 15 rows); x; y;
bc-3 (~ 15 rows); x; y;
cd-1 (~ 15 rows); x; y;
cd-2 (~ 15 rows); x; y;
cd-3 (~ 15 rows); x; y;
...
In this example, ab-1 represents one series of values. Where there is 15 data values in this series, one value by row. I would like each plot to have three series, represented by ab-1, ab-2 and ab-3 (So ~ 45 points, this is variable). How can I create multiple 3-series plots in MATLAB, where data is discredited by text in one column?

답변 (1개)

dpb
dpb 2018년 6월 23일

0 개 추천

Use readtable and then splitapply with the first column ID as grouping variable. I suggest turning it into categorical variable.

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

질문:

2018년 6월 22일

답변:

dpb
2018년 6월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by