reducing execution of addlistener callback loop

조회 수: 8 (최근 30일)
Ashley Dalrymple
Ashley Dalrymple 2014년 11월 6일
댓글: Geoff Hayes 2014년 11월 7일
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
Geoff Hayes
Geoff Hayes 2014년 11월 7일
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by