How can I avoid doubles from char arithmetic in fixed-point codegen in MATLAB Coder R2025a?
Show older comments
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?
Accepted Answer
More Answers (0)
Categories
Find more on Create Fixed-Point Objects in MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!