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
Walter Roberson
2020년 6월 5일
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
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에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!