How can I make the data type of inputs and outputs of s-function block in simulink not double?
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jiabo Ren
am 11 Okt. 2020
Beantwortet: Sunand Agarwal
am 14 Okt. 2020
I used the command 'mex my_contoller.c' to transform ''my_controller.c'' file into ''my_controller.mexw64'' file. And then I created a s-function block which has a name 'my_controller' in simulink. But the input and output data type are double by default, how can I make them boolean ? Because in my c code I define those variables as boolean not double.
0 Kommentare
Akzeptierte Antwort
Sunand Agarwal
am 14 Okt. 2020
Please run the following command on the MATLAB command line:
>> sfundemos
This will launch examples of different types of Simulink S-functions.
For your case, please go to C-file S functions -> Data typed I/O. You may refer to those blocks and C-code to include different datatypes (including boolean) in your S-function.
Hope this helps.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Block and Blockset Authoring 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!