is there any difference between debug mode and release mode in MATLAB?
이전 댓글 표시
I'm using Robotic System Toolbox, using callback function to read data from a robot.
There is a problem, when I run the code in debug mode, or, in the command line, it works correctly. However, when I run the code in release mode(which means, put the code in a function file, and then run that function file), matlab can't read any data from robot...
I wonder, if there any optimization in release mode that makes its result different from debug mode's. By the way, in release mode, if I use par for (parpool) and drawnow inside that function file, the code works correctly... If I just use par for, or just use drawnow, the code works wrong...
댓글 수: 5
Dingqiao Zhu
2016년 7월 7일
Walter Roberson
2016년 7월 7일
drawnow should not have much effect inside a parfor, as parfor workers cannot interact with the graphics system. However, it is possible that you are using a tight loop and as well have a device that needs callbacks (such as a serial device) and the device is having trouble getting the callback to execute in the tight loop. A tight loop and a timer should be okay in any release in about the last 5 years as timers are permitted to interrupt even without a pause() or drawnow()
Dingqiao Zhu
2016년 7월 7일
Walter Roberson
2016년 7월 7일
편집: Walter Roberson
2016년 7월 7일
What kind of callback is being processed, and where is the callback being defined (inside the parfor loop or outside the parfor loop) ?
Dingqiao Zhu
2017년 3월 8일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!