Compiled exe app doesn’t work on a function used within another function
So I have an app developed by MATLAB app designer. I have put my main backend code in a function and call that function on button press.
Here is my problem: While running in app designer everything is fine, but when I compile it as a stand-alone exe file and install it, the code doesn’t work properly. So I used messages in different parts of code to debug it and I find out that it stops as soon as it reaches first function used in the main function. Here is a demonstration of my main code, note that this is the main function called by app designer:
function maincode
x = 1;
y = 2;
z = secondfunction(x,y);
end
and my secondfunction is saved in another .m file (which I include in additional files before packaging)
function [sum] = maincode(first,second)
sum = first + second;
endSo I have an app developed by MATLAB app designer. I have put my main backend code in a function and call that function on button press.
Here is my problem: While running in app designer everything is fine, but when I compile it as a stand-alone exe file and install it, the code doesn’t work properly. So I used messages in different parts of code to debug it and I find out that it stops as soon as it reaches first function used in the main function. Here is a demonstration of my main code, note that this is the main function called by app designer:
function maincode
x = 1;
y = 2;
z = secondfunction(x,y);
end
and my secondfunction is saved in another .m file (which I include in additional files before packaging)
function [sum] = maincode(first,second)
sum = first + second;
end So I have an app developed by MATLAB app designer. I have put my main backend code in a function and call that function on button press.
Here is my problem: While running in app designer everything is fine, but when I compile it as a stand-alone exe file and install it, the code doesn’t work properly. So I used messages in different parts of code to debug it and I find out that it stops as soon as it reaches first function used in the main function. Here is a demonstration of my main code, note that this is the main function called by app designer:
function maincode
x = 1;
y = 2;
z = secondfunction(x,y);
end
and my secondfunction is saved in another .m file (which I include in additional files before packaging)
function [sum] = maincode(first,second)
sum = first + second;
end app designer, compiler, standalone, exe, function MATLAB Answers — New Questions