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 vue (au cours des 30 derniers jours)
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

Réponses (1)

Javier Bastante
Javier Bastante le 16 Mar 2016
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

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by