how to delete rows from a struct array?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
hello folks I have this struct array as shown bellow i'd like to delete all the rows where class is not 'double', so i'm wondering how to ? anyone can help !!!
![Sans titre.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/207424/Sans%20titre.png)
0 Commenti
Risposte (1)
Bob Thompson
il 7 Mar 2019
vars = vars([vars.class] == 'double');
This may not work exactly (I think you might need to use strcmp instead of ==, but it should get you going.
0 Commenti
Vedere anche
Categorie
Scopri di più su Structures in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!