reducing execution of addlistener callback loop

8 vues (au cours des 30 derniers jours)
Ashley Dalrymple
Ashley Dalrymple le 6 Nov 2014
Commenté : Geoff Hayes le 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 commentaire
Geoff Hayes
Geoff Hayes le 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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur App Building dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by