So I found the issue: In this large project, there was a java import for something entirely different, but that went wrong for some reason. And for even more unclear reasons, that failed import caused the issue. Long story short: when I remove all java imports, then it works.
Timer function and standalone display issues
1 次查看(过去 30 天)
显示 更早的评论
I have a rather large program, that has at one point a timer object. The issue I'm facing is the following: The following code segment
disp('starting')
start(timerobj)
disp('started')
where the timerfnc of the timerobj also displays text as first task - yields only starting started
But all text, that is displayed in the timerobj does not work. All other stuff in the timer works (the hardware communication, the GUI-interaction, everything) except for the display (or fprintf) commands. This happens in the standalone-compiled version, whoever, when I perform this in MATLAB (R2007b or R2010b, same probs) it works.
Does anyone have an idea where the issue might be?
Regards RS
采纳的回答
Sebastian Castro
2015-3-11
If your timer takes much longer to compute than the period you allow it, I can see why MATLAB would hang up and never be able to make it past the start of the timer. Recall that MATLAB is single-threaded (unless you're using Parallel Computing Toolbox functionality).
I would try the following things:
- Replace your timer function with (almost) blank code, i.e., something that runs really fast. Does MATLAB get to the "disp('started')" line?
- Increase the period of the timer to something really big, and then try bringing it down from there until your timer function can comfortably finish in the specified time.
- Sebastian
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!