A loop to extract and plot data from a table

12 vues (au cours des 30 derniers jours)
Ahmed Al
Ahmed Al le 21 Sep 2020
Réponse apportée : KSSV le 21 Sep 2020
I have a table that has 10 rows and 11 colums, I want to extract the colume data and plot them against x-axis. X-axis is 0:1:10. I want to plot all the data in one graph.
Do you have any suggestions about how to do this?

Réponses (2)

Ameer Hamza
Ameer Hamza le 21 Sep 2020
I think you meant x = 0:1:9 (10 rows).
You can do something like this
t % 10x11 table
M = table2array(t); 10x11 matrix
plot(0:9, M);
This plot all lines on one axes.

KSSV
KSSV le 21 Sep 2020
Let A be your 10*11 data.
x = 0:1:10 ;
plot(x,A)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by