Reputation: 755
Is it possible to show a loading message in Matlab, after start a treatment, and ideally disabled a button ? There is an example or a Linke? Thanks in advance for your help.
Upvotes: 1
Views: 535
Reputation: 18484
waitbar
can slow down your computation needlessly (by a lot if you're not careful). Though if you're doing GUI stuff already, it may have less of an effect – your question doesn't say. A while back, I wrote a full-featured, text-based waitbar
-alternative for my own use that is much faster: waittext
. It produces a progress bar right in your command window. See the detailed help for all of the options. Additionally, there are many text and GUI waitbar
-alternatives on the MathWorks FileExchange.
Again, if you already have a GUI, then a standard "disabled button" using callbacks is probably the way to go. Otherwise, you can try a combination of the standard Ctrl-C
and the onCleanup
function. This won't give you exactly the same capabilities, but it will allow you to clear objects in memory, delete temporary files, close open files, etc.
Upvotes: 1