I want to use a progress-bar during Matlab calulation

I have a calculation that will be done lets say 1,000,000 times, and I would like to increment a progress bar to indicate to the user that the computer is still working.

I saw a freind of mine doing something like this, but I couldn't find any sign of a progress bar in the Matlab help.

please help...


~\Q/~
~~~~
~~~~

Avi.
LVL 2
zultiAsked:
Who is Participating?
 
gordonkennedyCommented:
Try the following code :

   h = waitbar(0,'Please wait...');
   for i=1:100,
      % computation here %
      waitbar(i/100,h)
   end
   close(h)

Type "help waitbar" to see more information.

Regards,
Gordon
0
 
zultiAuthor Commented:
Thanks Gordon, that what I was looking for...

:~)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.