Main Content

File Naming Conventions

Use a consistent file naming convention to identify different types and versions of your MATLAB® files. This approach keeps your files organized and minimizes the risk of overwriting existing files or creating two files with the same name in different folders.

For example, the file naming convention in the Generating MEX Functions getting started tutorial is:

  • The suffix _build identifies a build script.

  • The suffix _test identifies a test script.

  • A numerical suffix, for example, _01 identifies the version of a file. These numbers are typically two-digit sequential integers, beginning with 01, 02, 03, and so on.

For example:

  • The file build_01.m is the first version of the build script for this tutorial.

  • The file test_03.m is the third version of the test script for this tutorial.