Import an Object Oriented Function with class developed with matlab into Simulink
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jérôme Vinçonneau
am 25 Mär. 2021
Bearbeitet: Pratheek Punchathody
am 5 Apr. 2021
Hello,
I am trying to import a code developed in Matlab using class in a simulink.
I did not found direct way to do it.
In C I see two solutions, using C-Caller or use an S-Function and a Mex file.
In C++ (with class) it seems that only S-Function + Mex are possible. So the first step is to transform the matlab code with class into c++ and the compile it in a mex file. But when integrated in the f-function I see a gateway error. It seems that I need to specify all I/O.
But my main function is complexe how to do it ?
Is there any better way ?
0 Kommentare
Akzeptierte Antwort
Pratheek Punchathody
am 30 Mär. 2021
Bearbeitet: Pratheek Punchathody
am 5 Apr. 2021
You can Create Custom Functionality Using MATLAB Function Block which helps to insert a MATLAB function block from the user-defined functions library.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!