What’s the closest thing to #define in Matlab?
From my question on StackOverflow (CC BY-SA 3.0):
In C, I might do something like this:
#define MAGIC_NUMBER (88) int foo(int a, int b, int c) { return a + b + c + MAGIC_NUMBER; } double bar(double x, double n) { return x + n + MAGIC_NUMBER; } /* * ...and so on with many kind-of-long functions using * MAGIC_NUMBER instead of writing a literal 88 like so: */ double bar(double x, double n) { return x + n + 88; }
What should I do in Matlab? (Needs to work across multiple files.)