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.

답변 (2개)

JThibault
JThibault 2018년 9월 26일
편집: Fangjun Jiang 2018년 9월 26일
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);
...

카테고리

도움말 센터File Exchange에서 Prepare Model Inputs and Outputs에 대해 자세히 알아보기

제품

릴리스

R2016b

질문:

2018년 9월 25일

편집:

2018년 9월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by