Borrar filtros
Borrar filtros

how to delete rows from a struct array?

3 visualizaciones (últimos 30 días)
Abdelmalek Benaimeur
Abdelmalek Benaimeur el 7 de Mzo. de 2019
Respondida: Bob Thompson el 7 de Mzo. de 2019
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

Respuestas (1)

Bob Thompson
Bob Thompson el 7 de Mzo. de 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.

Categorías

Más información sobre Structures en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by