A loop to extract and plot data from a table
2 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(2 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Line Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!