Extract element from a table
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Gaetano Pavone
le 10 Nov 2021
Réponse apportée : Steven Lord
le 10 Nov 2021
I have a 56x4 table in which first column collects strings, while the other columns have non-null number.
edgetable=table(edgetype,edgeindex,firstnode,secondnode);
I would like to extract edgeindexes such that edgetype is equal, e.g., to "CSE".
0 commentaires
Réponse acceptée
Steven Lord
le 10 Nov 2021
Let's make a sample table.
rng default
listOfTypes = ["apple"; "banana"; "cherry"];
T = listOfTypes(randi(numel(listOfTypes), 5, 1));
x = randi(10, 5, 1);
tt = table(T, x)
theCherries = tt(tt.T == "cherry", :)
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!