problem with the previous data in matlab gui

I am working on matlab gui. how to delete previous data that is stored in the gui variable? like clear in command window, is there anything like that in gui

回答 (1 件)

Jan
Jan 2017 年 10 月 31 日

0 投票

What is "the gui variable"? Do you mean the handles struct? Then:
handles.yourData = [];
guidata(hObject, handles);
Or
handles = rmfield(handles, 'yourData');
guidata(hObject, handles);
Or perhaps some persistent variables?
For a more precise answer, explain, how you store the variables.

4 件のコメント

Franck paulin Ludovig pehn Mayo
Franck paulin Ludovig pehn Mayo 2021 年 10 月 17 日
hello @Jan
I have a little problem. I was able to code a "Next button" using app designer that have as aim to draw lines. I had the data coming from excel. I am able to draw each line by clicking on the next button. The only problem is that the previous data/line is not deleted. So instead of having one line, i will have 2 or more depending on how many times i click on the next button.
any function hat could be helpful?
Jan
Jan 2021 年 10 月 17 日
Please ask a new question by creating a new question. Then answering is easier than if the question is hidden in a comment of an answer of another question.
Franck paulin Ludovig pehn Mayo
Franck paulin Ludovig pehn Mayo 2021 年 10 月 18 日
@Jan i did 3 days ago but so far no answer.Below is the link of my question.
Thank you i look forward to hearing from you soon.
Jan
Jan 2021 年 10 月 19 日

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

カテゴリ

ヘルプ センター および File ExchangeSoftware Development Tools についてさらに検索

質問済み:

2017 年 10 月 31 日

コメント済み:

Jan
2021 年 10 月 19 日

Community Treasure Hunt

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

Start Hunting!

Translated by