How to steer uiprogressdlg from external function

8 views (last 30 days)
I am building an App wit appdesigner in which a rather complex function is called. The function is at the moment not within the app. Due to its complexity, it is a standalone function file. First of all, its 1500 lines of code would make the app code extremely long. Furthermore, working within the normal matlab interface enables me much more do to optimisations and tests on the function. Within the app it is much more difficult to look at intermediate values etc.
Within the function, I use the waitbar a lot to show progress through all the different calculation steps (as calculations can take multiple hours). Now for the app, I assume it is best to use uiprogressdlg for that purpose. In the end, this app must be deployed standalone to non-Matlab users.
However, I don't seem able to steer the uiprogressdlg from the external function. Is there a way to do this? Or is my only option to integrate the function fully within the app?

Accepted Answer

Jiri Hajek
Jiri Hajek on 10 Nov 2022
Hi, I believe you could use the function setappdata, which allows you to change global variables in your app from an external function:
Simon Allosserie
Simon Allosserie on 14 Nov 2022
This works perfectly! Thanks for your elaborate example, now I'm able to make all the necessary connections between my app and my external function.
All the best,

Sign in to comment.

More Answers (0)


Find more on Develop uifigure-Based Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by