how delete empty fields in a struct
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
elisa ewin
il 11 Mag 2016
Commentato: Lynn McCane
il 26 Giu 2023
Hi! I have a struct (attached) and I want to delete the empty field, how can I do?
0 Commenti
Risposta accettata
Andrei Bobrov
il 11 Mag 2016
Modificato: Andrei Bobrov
il 11 Mag 2016
out = {t(~cellfun(@isempty,{t.places})).places};
t = cell2struct(out,{'places'},1);
or jast
t = t(~cellfun(@isempty,{t.places}));
Più risposte (0)
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!