![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175013/image.jpeg)
Why the interpreted MATLAB function block is giving a different result from the Fcn block ?????
2 次查看(过去 30 天)
显示 更早的评论
Hi everyone,
I used the same mathematical expression to perform a calculation using the interpreted MATLAB function block and the Fcn block.
As you will see in the model, which is attached to this question, the two results are completely different.
Can someone give me an explanation to this ? Which is the correct one of the two results ?.
Thank you very much in advance.
0 个评论
采纳的回答
Swarooph
2016-9-9
When I run your model, I get 2 warnings as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175013/image.jpeg)
You can see that the outputs of the functions are complex. Fcn block as far as I know doesn't support complex input/output signals (only real numbers). Although I have to say the documentation doesn't explicitly say that. the interpreted Matlab function does allow for output to be complex. You can set that using the Output signal type option discussed here .
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!