weird error when run simulinlk

1 次查看(过去 30 天)
Yang Shen
Yang Shen 2019-12-17
when I run the below simulink program, there is a error: 'Domain error. To compute complex results, make at least one input complex, e.g. 'power(complex(a),b)'.' But I don't compute complex results. And if I copy the matlab function into a .m file, and run it in matlab (not simulink), I can the right results.
Could somebody help me fix this please? I have suffered it one week.

回答(1 个)

Urmila Rajpurohith
MATLAB transforms the values to complex when it is needed but Simulink does not.
You can have a look at similar question:

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by