Getting the evaluation progress of the gather command

1 回表示 (過去 30 日間)
Nathan
Nathan 2024 年 11 月 28 日
コメント済み: Nathan 2024 年 12 月 2 日

The gather command displays its evaluation progress in the Command Window, but I would like grab that number and display it in a MATLAB App label (requiring it to evaluate in the background, so I would use parfeval). However, I cannot find any way to access the evaluation progress. Is there an undocumented way to access the property? Edit: Here is an example from the Command Window

    Evaluating tall expression using  the local MATLAB session:
    - Pass 1 of 2: 46% complete
    Evaluation 25% complete

The 25% value is what I am trying to get.

  3 件のコメント
Nathan
Nathan 2024 年 11 月 28 日
編集済み: Nathan 2024 年 11 月 28 日

Apologies, I mean the Command Window. I would upload a screenshot of what I mean, but my network restricts me from using forms so I am writing on my phone. Here is a code snippet from the Command Window:

    Evaluating tall expression using  the local MATLAB session:
    - Pass 1 of 2: 46% complete
    Evaluation 25% complete

(I hope that formatted itself properly, I can't see the preview on my phone!)

The 25% value is what I am trying to get.

Walter Roberson
Walter Roberson 2024 年 11 月 28 日
Ah, you are using gather (tall array) instead of gather (Parallel Computing Toolbox)

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

採用された回答

Walter Roberson
Walter Roberson 2024 年 11 月 28 日
You need to turn diary on, and access the diary file while it is still being written. As you will need code to do that, and the code needs to run at the same time as the gather() command, you will need to ran the gather in a background thread or a parallel process (but doing so is likely to interfer with writing to the diary...)
There is no simple way to handle this task.
  1 件のコメント
Nathan
Nathan 2024 年 12 月 2 日
Thank you! That is a shame as that won't work once the app is compiled, but I was able to get something close to what I was looking for so I'll accept your answer.

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by