matlabmatlab-app-designer

How to show that calculation is going in MATLAB App


A rough app I have recreated.When the user clicks "Calculate", I want to show that calculations are happening like a progress bar or "Calculate" Button changes to "Calculating" and after calculations are done revert back to "Calculate". Code for app is:

a = app.Number1EditField.Value;
b = app.Number2EditField.Value;
x = 10*rand(1,1);
eqn = 12- (a+b+x);
while eqn ~= 0
        x = x + 0.0001;
end
app.AnswerEditField.Value = x;

P.S I know here the answer won't come.


Solution

  • You can use uiprogressdlg to create a (modal) progress bar.