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 日

0 投票

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 ExchangePrepare 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