A loop to extract and plot data from a table

조회 수: 13 (최근 30일)
Ahmed Al
Ahmed Al 2020년 9월 21일
답변: KSSV 2020년 9월 21일
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?

답변 (2개)

Ameer Hamza
Ameer Hamza 2020년 9월 21일
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 2020년 9월 21일
Let A be your 10*11 data.
x = 0:1:10 ;
plot(x,A)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by