How to make coder use #define macro for constant values
Show older comments
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?
Answers (0)
Categories
Find more on Quantization 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!