Level 2 MATLAB s-function problem R2018b

조회 수: 1 (최근 30일)
Helmut Schlagnitweit
Helmut Schlagnitweit 2019년 1월 30일
답변: Helmut Schlagnitweit 2019년 2월 1일
Hey everyone,
for my Thesis work I have got a Simulink-Model that was created on R2015b and it worked without a problem. If I try the same model with the same settings on R2017b or R2018b, the simulink debugger comes up with an error, that is attached to this question. Does anyone know, if there are any changings in the Level 2 s-function structur in the newest versions?
Error: The following is the MATLAB call stack(file names and line numbers) that produces the error:
in line 238 the error appears
[237] M = F*D/2
[238] block.OutputPort(5).Data(1) = M;
thanks
BR
Helmut

채택된 답변

Helmut Schlagnitweit
Helmut Schlagnitweit 2019년 2월 1일
The problem was a result from the InitializeCondition(block). I have used a InputPort to get starting data and this regarding to http://www.mathworks.com/help/releases/R2017b/simulink/sfg/initializeconditions.html should no be used in that section. Therefor a variable becomes Zero and lead to a complex number for M.
Just to close this question

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by