Why does my MATLAB Compiler 4.15 (R2011a) generated program which contains a TIMER object not execute in an expected manner?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 21 Sep. 2023
Beantwortet: MathWorks Support Team
am 21 Sep. 2023
I compiled a MATLAB program with a TIMER object to an executable file, but the executable file does not work correctly. The MATLAB program works well inside MATLAB desktop.
Akzeptierte Antwort
MathWorks Support Team
am 21 Sep. 2023
This issue is due to how the deployed application determines when to stop executing. The callback function of the TIMER object stops when the function written exits normally.
To resolve this issue, you can prevent your application from terminating by using the built-in function 'waitforcallbacks' as demonstrated in the 'testTimer.m' attached.
Note:
The attached file is valid for MATLAB R2011a. For later versions, replace 'waitforcallbacks' with 'waitfor' in order to make the function work.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!