I have one GUI (say G1) that calculates a certain value and displays it in an editbox.I need this value to be passed to an editbox in another GUI (say G2) on the click of a pushbutton for further calculations.Please help.
1 回表示 (過去 30 日間)
古いコメントを表示
I NEED 'edit3' value to be passed from G1 to...... edit1=str2num(char(get(handles.edit1,'String'))); edit2=str2num(char(get(handles.edit2,'String'))); if ~isempty(edit1) && ~isempty(edit2) edit3=asind(edit1/edit2); set(handles.edit3,'String',num2str(edit3)); end
BE PASSED TO 'edit1' in G2 for the following calculations: edit1=str2num(char(get(handles.edit1,'String'))); % edit2=str2num(char(get(handles.edit2,'String'))); % if ~isempty(edit1) && ~isempty(edit2) % edit3=(edit2/cosd(edit1)); % edit4=(sind(edit1)*edit3); % set(handles.edit3,'String',num2str(edit3)); % set(handles.edit4,'String',num2str(edit4)); % end
0 件のコメント
回答 (1 件)
Javier Bastante
2016 年 3 月 16 日
My advice is to save the variable in a *.mat file, such as:
save myfile.mat varname
and to get the value you just type
load myfile.mat
and then you can delete the file in order to avoid been seen:
delete myfile.mat
Be sure aboour the path. It must be the same in both cases.
Hope it's useful. Best regards
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!