MATLAB: Hi guys, I’m trying to create a multiwindow app. It’s the first app but I’m taking this error. How to solve it

app designercase-sensitive matchmatlab gui

mainapp1.png
mainapp2.png

Best Answer

I beleive your error is here
% Code that executes after component creation
function startupFcn(app, MainApp, a, b, c)
% Store main app in property for CloseRequestFcn to use
app.CallingApp = mainApp; % <----------------------------- HERE
Should be
app.CallingApp = MainApp; % with capital M
Make that change, save the app, close the app, restart it, and test it. If the problem persists, I'd be glad to look further.