Remove/Refresh all Fields

2 ビュー (過去 30 日間)
Dc215905
Dc215905 2020 年 3 月 16 日
コメント済み: Dc215905 2020 年 3 月 17 日
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

採用された回答

Rik
Rik 2020 年 3 月 16 日
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.
  1 件のコメント
Dc215905
Dc215905 2020 年 3 月 17 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by