I have C++ class with multiple methods and header file associated with it. I am unable to figure out (using s-function builder block) how to pass arguments to these functions which are the inputs to the s-function. In other words I am not able to figure out how to map the inputs of the s-function from simulink to the arguments of my class method.

답변 (1개)

Mark McBroom
Mark McBroom 2019년 2월 2일

0 개 추천

Try this link.

댓글 수: 2

Sascha
Sascha 2024년 8월 9일
The link is broken. I have the same application, are there any examples or documenation which covers this?
Mark McBroom
Mark McBroom 2024년 8월 9일
The C Function block is now the recommended approach for calling external C++ code. See this example: Call C++ Class Methods Directly from a C Function Block - MATLAB & Simulink (mathworks.com)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기

제품

릴리스

R2018a

태그

질문:

2019년 1월 31일

댓글:

2024년 8월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by