I need help using a p function as a block in simulink.

조회 수: 2 (최근 30일)
Rees Fullmer
Rees Fullmer 2017년 4월 4일
답변: Varun Gunda 2017년 4월 7일
I have a proprietary function in the form of a p file. I would like to include it as an element in a simulink program. Typically I take a *.m function and simply copy and paste it into a matlab function block. That is not possible here, or so I think. Any advice is welcome!

답변 (1개)

Varun Gunda
Varun Gunda 2017년 4월 7일
MATLAB functions can call P-code. When the .m and .p versions of a file exist in the same folder, the P-file takes precedence. Call the pcode file from the .m file to MATLAB Function Block. You should be able to do that.

카테고리

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