how to delete rows from a struct array?
Ältere Kommentare anzeigen
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 !!!

Antworten (1)
Bob Thompson
am 7 Mär. 2019
0 Stimmen
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.
Kategorien
Mehr zu Structures finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!