Delete fields of struct based on starting characters
Mostrar comentarios más antiguos
Hello everyone. I have a struct called temp which has 5 fields

I want to delete all the fields starting with 'fig' and 'ax'. The final output struct should look something like

I know that we can do it in a complex way using fieldnames and rmfield with multiple lines of code.
Is there any simple way to do this? Thanks in advance.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Structures en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!