plot columns of a table
348 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
MathWorks Support Team
le 1 Mai 2018
Réponse apportée : MathWorks Support Team
le 1 Mai 2018
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'});
Réponse acceptée
MathWorks Support Team
le 1 Mai 2018
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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Tables 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!