How can I avoid doubles from char arithmetic in fixed-point codegen in MATLAB Coder R2025a?
Mostra commenti meno recenti
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?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Create Fixed-Point Objects in MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!