how could i extract the output of the included mfile in GUI callback function to edit text

2 ビュー (過去 30 日間)
hello i am a new user of matlab and GUI. i am doing a college project on GUI. i have included a script in callback function of pushbutton ,now i want to display it in edit box. that is i am unable to extract the output from the script file and pass it to edit text. how can i do that, kindly reply

回答 (1 件)

Dishant Arora
Dishant Arora 2014 年 3 月 11 日
function pushbutton_callback()
Output = yourFunctionFile;
set(handles.edit1 , 'string' , Output)
  2 件のコメント
Disha Bhattacharjee
Disha Bhattacharjee 2014 年 3 月 11 日
hi dishant, thanks for your answer, but m nor using any function, instead i am using script and i want to display output from the script, it would be very kind if u answer that thank u
Dishant Arora
Dishant Arora 2014 年 3 月 11 日
% To be mentioned under gui opening function
setappdata(0 , 'handlesEdit' , handles.edit1)
set(getappdata(0 , 'handlesEdit') , 'string' , Output) % in you script file

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

カテゴリ

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