Matlab Coder and S-Functions

7 Ansichten (letzte 30 Tage)
Elijah Hedrick
Elijah Hedrick am 20 Mär. 2019
Kommentiert: Amal George M am 26 Mär. 2019
I am trying to convert a Matlab function to an S function via the Matlab coder app. I have sucessfully exported the function through the app, but now I am stuck on how to implement the exported C++ code as an S-Function. Is there a way to do this through the S-Function Builder block and what files from the Matlab coder app would need included there?
Thanks!
  3 Kommentare
Elijah Hedrick
Elijah Hedrick am 21 Mär. 2019
Thanks! I had tried that implementation, but the problem that I ran into was that I have varaible size input and output matrices, as well as changing sizes within the function, and simulink was complaining about this. Is there a way that I can set these variables to be variable size through the implementation of the Matlab function block, or do I have to do that manually through an S-Function (or any other method)?
Thanks for your help!
Amal George M
Amal George M am 26 Mär. 2019
Please refer to the following documentation on making the signal variable-size:https://in.mathworks.com/help/simulink/ug/declare-variable-size-inputs-and-outputs.html

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by