Level 2 MATLAB s-function problem R2018b

2 ビュー (過去 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 件)

Community Treasure Hunt

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

Start Hunting!

Translated by