reducing execution of addlistener callback loop

8 Ansichten (letzte 30 Tage)
Ashley Dalrymple
Ashley Dalrymple am 6 Nov. 2014
Kommentiert: Geoff Hayes am 7 Nov. 2014
I am running a callback function using addlistener, and no matter what it is in the callback function it loops the every 100ms (or 10Hz). Is there a way to speed this up to say 50Hz (or looping every 20ms)? I'm guessing this is inherent to addlistener. The data collection is very fast but the callback function has an algorithm for decision making and with it taking 100ms to execute every time slows down my whole system.
  1 Kommentar
Geoff Hayes
Geoff Hayes am 7 Nov. 2014
Ashley - it sounds like you may want to optimize the code in your callback function. Can you post the code? Have you verified that callback function responds to the data collection at a faster rate if there is no decision-making functionality, just to determine if this code is the cause of the performance degradation?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu App Building finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by