Tips are,
In GUI1, you need to set properties as public (properties (Access = public)) in order to pass the variables to GUI2.
In GUI2, you need to define startupFcn and add an input argument of GUI1 so that GUI1 can call GUI2 with its object.
Defining CallingApp property in GUI2 to store the object of GUI1.
properties (Access = private)
CallingApp
end
Then, define startupFcn in GUI2.
function startupFcn(app, mainapp)
app.CallingApp = mainapp;
end
Now, you can access variables of GUI1 in GUI2 by using app.CallingApp.
In GUI1, you can call GUI2. Suppose GUI2 name is GUI2.mlapp,
function DeconvoluteButtonPushed(app, event)
GUI2(app);
end
Best Answer