Matlab coder, fixed point conversion
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Walter Roberson
il 5 Giu 2020
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
Risposte (1)
Kiran Kintali
il 5 Giu 2020
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
0 Commenti
Vedere anche
Categorie
Scopri di più su Fixed Point Conversion Basics and Type Specification in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!