S-Function Builder C++

1 view (last 30 days)
Vishnu Teja Vithala
Vishnu Teja Vithala on 31 Jan 2019
Commented: Mark McBroom on 9 Aug 2024
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.

Answers (1)

Mark McBroom
Mark McBroom on 2 Feb 2019
Try this link.
  2 Comments
Sascha
Sascha on 9 Aug 2024
The link is broken. I have the same application, are there any examples or documenation which covers this?
Mark McBroom
Mark McBroom on 9 Aug 2024
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)

Sign in to comment.

Categories

Find more on Block and Blockset Authoring in Help Center and File Exchange

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!