Is it possible that a C-mex s-function outputs single float data ?

It seems that by default the level 2 S-function wrapper uses double float type without any possibility to use single float.

Respuestas (2)

JThibault
JThibault el 26 de Sept. de 2018
Editada: Fangjun Jiang el 26 de Sept. de 2018
Thanks, i will thus use the following :
ssSetInputPortDataType(S, 0, SS_SINGLE);
...
ssSetOutputPortDataType(S, 0, SS_SINGLE);
...
real32_T *u1 = (real32_T *) ssGetInputPortSignal(S, 0);
...
real32_T *y1 = (real32_T *) ssGetOutputPortSignal(S, 0);
...

Categorías

Más información sobre Prepare Model Inputs and Outputs en Centro de ayuda y File Exchange.

Productos

Versión

R2016b

Preguntada:

el 25 de Sept. de 2018

Editada:

el 26 de Sept. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by