How can I avoid doubles from char arithmetic in fixed-point codegen in MATLAB Coder R2025a?
Ältere Kommentare anzeigen
I am generating fixed-point code using Fixed-Point Designer and MATLAB Coder R2025a. My code will be used on a small embedded microcontroller that does not support floating-point operations. One of the lines of code that is being translated as resulting in data of type
"double" rather than "char" is the following:
x(:) = (s(i) - '0');
where "s" is a character array.
What do I need to do to get the generated code to not use doubles in instances like this?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Create Fixed-Point Objects in MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!