How can update axes simultaneously with function running

2 次查看(过去 30 天)
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.

回答(1 个)

Walter Roberson
Walter Roberson 2017-8-26
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 个评论
Jan
Jan 2017-8-26
@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.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Dialog Boxes 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by