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 日間)
古いコメントを表示
Robert Stettler
2015 年 3 月 11 日
コメント済み: Robert Stettler
2015 年 3 月 13 日
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!