How to load matlabFunction output into Simulink
조회 수: 1 (최근 30일)
이전 댓글 표시
I have a very complicated matrix inversion. I turned the resulting matrix into a function using matlabFunction. I need to find a way to evaluate the resulting function in simulink.
댓글 수: 0
답변 (2개)
Paul
2021년 9월 15일
matlabFunctionBlock can be used to generate a block directly into the Simulink model from the symbolic expression. It will only be availabe in Simulink. If you need the function in Matlab and Simulink, then use matlabFunction with the 'file' option and then call that m-function from inside a Matlab Function block in the Simulink model.
댓글 수: 0
Walter Roberson
2021년 9월 15일
When you use matlabFunction(), give it the 'file' option to write the code into a file. After that, you can use the file name as a function name just like any other .m file.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Model Editing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!