this .m file has a subtle bug that i didn't bother to fix. As the previous person commented it has troubles redefining (overwriting) the constants
The idea is a good one! It did save me the trouble of declaring global variables and invoking the global variables in subfunction where i need the global variables, but as it sometimes fails (and i dont know when exactly) to overwrite the constants, i stopped using this define.
I seems to work good on Matlab 7.5, if you don't need to redefine during the execution.
(...on Matlab 7.5, I have troubles redefining constants, the value is not updated, even with 'undefine/define'...)