Matlab coder, fixed point conversion

Hello
i want to generate C code using Matlab coder with fixed point conversion.
My objective is to genereate C code with only Integer type
in the fixed point converter, proposed type can't be set with specific slope and bias values like this (T = numerictype(s,w,slope,bias))
Objective is to convert a programm which deals with double data (Matlab) in C code that deals with Integer data with a 10^5 resolution
ex : double input Data of 6.123456789 converted in the generated code in an Int32 input 612345
Any ideas ?

댓글 수: 1

T = fi(6.123456789, 1, 32, 1e-5, 0); %signed 32 bit slope 1e-5
storedInteger(T) %-> uint32 612346
However I have not tried the Fixed Point Convertor

댓글을 달려면 로그인하십시오.

답변 (1개)

Kiran Kintali
Kiran Kintali 2020년 6월 5일

0 개 추천

Hi Jerome,
Can you share a sample of MATLAB code with floating-point and expected integer type code from fixed-point converter? you can take the generated fixed-point MATLAB code from floating-point MATLAB and hand modify to suit your requirements. It woudl be useful to suggest alterates possible or consider future enhancements in the area.
Thanks

카테고리

도움말 센터File Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품

태그

질문:

2020년 6월 2일

댓글:

2020년 6월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by