Find constant variables

Finds constant variables in .m files
729 Downloads
Updated 28 Aug 2008

No License

FINDCONSTANTS searches in all the .m files under a chosen directory and writes to an output file (results.txt) all the assignments of constant values to variables. The core of the programme is the regular expression that can be modified to search specific strings.
Assignments have to comply with matlab format (eg: x_1.y_2 = 1.5e-2;)

I use it in programs with many files, where sometimes people use constant values that then forget to update when the conditions are changing.

Cite As

Joao Silveira (2026). Find constant variables (https://www.mathworks.com/matlabcentral/fileexchange/21218-find-constant-variables), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2008a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on File Operations in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0

Updating description