Modell Callbacks (e.g. PreLoadFcn, InitFcn) not performed in Matlab 2016b

조회 수: 2 (최근 30일)
RobinZ
RobinZ 2017년 6월 7일
편집: RobinZ 2017년 8월 4일
Hello, in Matlab 2016b my model callbacks are not performed correctly any longer. Code that worked properly in a former Matlab version, for example "disp('test')" or "clear all", is not carried out when beeing called in the InitFcn in Matlab 2016.
Thank you very much! BR Robin

답변 (1개)

Kushagr Gupta
Kushagr Gupta 2017년 6월 9일
The commands mentioned should definitely work in R2016b in all kinds of callbacks as and when those callbacks are executed.
As they are not in your case , I recommend to create a Technical Support Case as this would take some additional debugging to figure out where the issue is.
  댓글 수: 1
RobinZ
RobinZ 2017년 8월 4일
편집: RobinZ 2017년 8월 4일
Thank you! I created a Technical Support Case concerning this. Apparently apart from Matlab R2014a due to the introduction of the diagnostic viewer some Model Callback commands (e.g. "disp") are not shown in the command window any longer.
Possible workarounds: * starting the simulation with the 'sim' command * call the output in the command window with "fprintf"
I hope this may help someone sometime :)

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

카테고리

Help CenterFile Exchange에서 Model, Block, and Port Callbacks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by