How to make coder use #define macro for constant values

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?

Respuestas (0)

Etiquetas

Preguntada:

el 14 de Feb. de 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by