How to speed up UIAxes in App Designer

8 ビュー (過去 30 日間)
Fabian Gock
Fabian Gock 2018 年 8 月 1 日
コメント済み: Fabian Gock 2018 年 8 月 5 日
I created a progress bar in App Designer using UIAxes and barh().
The function, wich progress I want to display has a for-loop. So I simply plot barh(app.UIAxes, 0.5, progress) at the end of every iteration. (0.5 because YLim is 0 to 1 so the bar will be centered)
Now the problem is, that barh seems to be too slow to update and the bar will only be plottet at the last iteration (full bar, because function is completed)
Is there a workaround for this problem?
Thanks in advance and kind regards
-Fabian

採用された回答

Chris Portal
Chris Portal 2018 年 8 月 4 日
Hard to say for sure without seeing the surrounding code, but you may need a call to DRAWNOW in your for loop.
Alternatively, UIPROGRESSDLG was designed for this kind of use case. It’s not embeddabke into the app (it’s a modal floating dialog), but it would likely work for you, assuming you’re on R2018a.
  1 件のコメント
Fabian Gock
Fabian Gock 2018 年 8 月 5 日
Thanks Chris,
I will try the DRAWNOW command and let you know whether it works or not. I know about the UIPROGRESSDLG but tried to avoid using it because I wanted an embedded solution.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by