Azzera filtri
Azzera filtri

Making calculation in one and displaying results in other GUI

3 visualizzazioni (ultimi 30 giorni)
Hello,
I have two GUIs, one for input data and other one for results. What I want is that when I insert all data in edit boxes of first GUI and when I click 'Calculate', second GUI to be opened with all results from calculation that was performed in the first GUI. I tried something with setappdata and getappdata but couldn't make it work. Example:
GUI1
function pushbutton1_Callback(hObject, eventdata, handles)
run gui2
a=str2double(get(handles.edit1,'string'));
b=str2double(get(handles.edit2,'string'));
c=multiply(a,b)
setappdata(0,'x',c);
GUI2
function edit1_Callback(hObject, eventdata, handles)
a=getappdata(0,'x');
set(handles.edit1,'string',a)
  1 Commento
Rik
Rik il 7 Gen 2018
Isn't it possible for your case to use guidata on one of the two figures by just passing a handle to the figure of GUI 1 as an input argument for the function starting GUI 2?

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Interactive Control and Callbacks in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by