How to make coder use #define macro for constant values
Afficher commentaires plus anciens
I have a list of physical constants which are defined as constant properties in a classdef. For instance:
classdef uniConst
properties (Constant)
gravity=9.81;
pressure=1021;
end
end
When I use coder on a matlab script, coder inserts all of these constants as hard-coded values (such as 9.81 instead of gravity). Is there anyway to make coder use #define statements for such constant values so that the resultant code can be more human-readable?
Réponses (0)
Catégories
En savoir plus sur Quantization dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!