Clear Filters
Clear Filters

How can update axes simultaneously with function running

2 views (last 30 days)
I have developed a function which download a map from google.
[matlabImage mask1 col col1 x y boundaries]=read_img();
The time of this function is varying depending on internet speed.
I would like to add a wait giff to show when this function is executing. However, I dont know how to do it.

Answers (1)

Walter Roberson
Walter Roberson on 26 Aug 2017
The normal waitbar cannot be easily used because it requires that the code updates the bar as the code realizes more has been done. The code would also need to know the total size to figure out the fraction.
Without those the closest you can get is to use Java to change the waitbar style to something that moves (spins) without being updated. The user would not be able to tell how far the code had progressed
  3 Comments
Jan
Jan on 26 Aug 2017
@Amir: Suggesting some code demands for bold guessing of what happens inside your read_img. Does it contain a loop or anything else, which would allow for estimating the required time? Please provide the relevant part of your code.

Sign in to comment.

Categories

Find more on Dialog Boxes 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!