フィルターのクリア

Matlab GUI connect with another function

1 回表示 (過去 30 日間)
Pepa
Pepa 2011 年 4 月 16 日
Hallo,
I did some GUI in Matlab with buttons, texts... I need from some function call GUI and change some text...
set(handles.text3,'String',x)
But I don´t know how can I call it.
Thank you.
  2 件のコメント
Paulo Silva
Paulo Silva 2011 年 4 月 16 日
can you specify what's that "another function"? "some function"?
Pepa
Pepa 2011 年 4 月 16 日
My project is compound of several functions.
function section = sec(extr)
x = 5;
.
.
.
%set(handles.text3,'String',x) %call GUI
and I need in inside call GUI... I think it is very simple, but I was not working with GUI.

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

採用された回答

Paulo Silva
Paulo Silva 2011 年 4 月 16 日
On the OpeningFcn of your gui tag the textbox
set(handles.text3, 'Tag', 'myGUItxt3')
Now to change the string of that textbox just do:
set(findobj(0, 'Tag', 'myGUItxt3'),'String',x)
Even in the command line you can change that string, just remember to have the GUI open because it results on error if it's not open.
  1 件のコメント
Pepa
Pepa 2011 年 4 月 16 日
Thank you.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by