Is there any way of processing callbacks without updating the figures? I know that drawnow can update the figures without processing callbacks, but is there some way of doing the opposite? In the code I'm writing, the callbacks are important and need to be handled regularly, but updating the figures is lower priority. I also tried pause(0), but I didn't see any difference between that and drawnow.

 採用された回答

Stephen23
Stephen23 2026 年 1 月 10 日

0 投票

Callback functions are just functions, there is nothing magical about them: you can call them from other functions, scripts, classes, etc just like you would any other function. So to "regularly" process the functions you can call them in a loop or use a timer or something of that ilk.

Pay careful attention to the required and optional input arguments!

1 件のコメント

Glenn Kubota
Glenn Kubota 2026 年 1 月 12 日
I have a lot of callbacks, but there are only a few that are super time-critical. I guess that will work for me. It would still be easier if MATLAB had a function that did would process callbacks without me having to poll status, put together an event structure, and call my callback functions. But, I suppose that is just wishful thinking.
Thanks!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Interactive Control and Callbacks についてさらに検索

製品

リリース

R2025b

Community Treasure Hunt

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

Start Hunting!

Translated by