Azzera filtri
Azzera filtri

Remove/Refresh all Fields

2 visualizzazioni (ultimi 30 giorni)
Dc215905
Dc215905 il 16 Mar 2020
Commentato: Dc215905 il 17 Mar 2020
I've created a data analysis GUI where you can load in several datasets and run a numbe of preprocessing steps.
I'd like to include a refresh buttton that clears all of fields. I've used :
handle = rmfield(handles, 'uniqueField'),
but is there away to just:
handles = rmfield(handles, 'ALL')
Thanks

Risposta accettata

Rik
Rik il 16 Mar 2020
Yes, although you should consider changing your data structure.
handles = struct;%will do what you ask
You should store all data in just a single field of the guidata struct. That way you can simply overwrite that single field with an empty struct.

Più risposte (0)

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!

Translated by