Level 2 MATLAB s-function problem R2018b

1 次查看(过去 30 天)
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
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