waitbar matlab before start a standalone script

I did a standalone application in Matlab and it works. The only problem is that when I launch the application, it takes time before start asking to the user some file (it is the first think the program has to do). The user does not understand if the program is working or not, since no message neither symbol of working progress appear on the screen. My idea is to show a waitbar until the window asking the file to user appears.

How can I do this? is it possible to use the waitbar outside a loop?

The script starts as follow:

close all
clear all

[filename,pathname] = uigetfile({'*.xlsx'},'Opening File','C:\');

I don't know why, it takes time before open the window for choosing the file.


ANSWERS:


The time between launch and file selection input appearing is most likely due to the time it takes to load the MCR. You could add a splash screen to your compilation.

If the end user is running from a command line wrap your exe in a system/shell which writes to the command window that the application is starting.


Your issue is most likely the use of clear all. This makes MATLAB remove all variables (in scope, global and persistent), and compiled scripts from memory, forcing it to recompile and load everything again.

If your purpose is to clear all variables in the current scope, you should be able to increase the initial speed of your script by only running clear instead.

Even faster speed can be achieved if you specify which variables to clear using clear var1 var2 ...



 MORE:


 ? matlab progress bar not depanding on time
 ? JavaFX ProgressBar/ProgressIndicator: listen for change from multiple Sliders
 ? JavaFX ProgressBar/ProgressIndicator: listen for change from multiple Sliders
 ? JavaFX ProgressBar/ProgressIndicator: listen for change from multiple Sliders
 ? JavaFX ProgressBar: how to add an animation?
 ? JavaFX ProgressBar problems
 ? JavaFX ProgressBar Wont Reset
 ? How can you send information to the windows task bar from java o javafx
 ? How to add glow effect In JavaFX custom progressbar
 ? Recalculate the progress percentage according to potential errors