Problems with waitbar sizing

9 ビュー (過去 30 日間)
L Wright
L Wright 2019 年 10 月 10 日
回答済み: Bjorn Gustavsson 2019 年 10 月 10 日
I want to display a message whilst a long run is occuring, and the only way I can get this message to appear during a run without requiring a user response appears to be a waitbar. Eventually I want to turn this into an executable.
If I enter
progressdisp12 =waitbar(0.0,['First model run in progress. Current valuesofunknowns:' num2str(1000)], 'Units', 'pixels','Position',[125 125 1000 100]);
then the waitbar appears with the size and message that I have specified.
If I enter
progressdisp12 =waitbar(0.0,['First model run in progress. Current values ofunknowns:' num2str(1000)], 'Units', 'pixels','Position',[125 125 1000 100]);
which has one more space in it (but is still not quite what I want), the waitbar shrinks back to the default size so I lose half the message. I need a big waitbar because eventually there may be more than one unknown.
I'm assuming this is a bug rather than a feature or an error on my part. If anyone has another way to display an updatable permanent message during a long run I'd be grateful to learn what to do.

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2019 年 10 月 10 日
Have a look at this command-line progress-bar version. It is less visually intrusive when working with other stuff while matlab runs: progressbar
HTH

カテゴリ

Help Center および File ExchangeDialog Boxes についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by