plot columns of a table
338 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2018-5-1
回答: MathWorks Support Team
2018-5-1
How do I plot two of the columns of my table?
I have a table "t" with variable (column) names "x" and "y". How do I plot these variables as plot(x,y)?
>> t = table([2 4 5]', [7 3 5]', 'VariableNames', {'x','y'});
采纳的回答
MathWorks Support Team
2018-5-1
This can be done by accessing the data of the table. The following link details how you can extract data from a table:
The method below uses Dot Indexing.
>> plot(t.x, t.y);
0 个评论
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!