TimeIsNear
TimeIsNear

Reputation: 755

Matlab - how display a waiting message or gif, when operation not done ?

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

Answers (2)

horchler
horchler

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

Vuwox
Vuwox

Reputation: 2359

There a loading bar in this matlab example, each step have a waitBar.

It easier with an example to understand, but here the documentation : waitBar

Upvotes: 2

Related Questions