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 visualización (últimos 30 días)
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

Respuestas (1)

Javier Bastante
Javier Bastante el 16 de Mzo. de 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

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by