Level 2 MATLAB s-function problem R2018b

2 views (last 30 days)
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

Accepted Answer

Helmut Schlagnitweit
Helmut Schlagnitweit on 1 Feb 2019
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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!