Collection of proposed MATLAB style guides, naming conventions, and recommendations.
Each program generally has set standard for coding stlye and naming conventions. However, MATLAB does not have an established company or community standard. There have been efforts to develop and agree on a standard, like PEP8, but some of these resources are conflicting and are scattered across websites and forums.
Here, I hope to maintain a library of resources and recommendations to
- Easily find relevant information regarding style and naming conventions
- Propose or develop a community-agreed standard
Additional background information can be found here.
Disclaimer: The style guide in this project is my opinion. However, it follows most of the content/consensus in prior documentation.
Briefly, most of the previously developed style guides and naming convention documents are inspired by the same 2 or 3 sources.
For more downloadable or linked resources, see Resources.
My complete style guide can be found here.
Do you disagree or see problems? Maybe questions or recommendations? Consider one or more of the following
Previously developed style-guides:
- MATLAB Style 2.0
- MATLAB Programming Style Guide
- Elements of MATLAB Style with updates
- MATLAB Guidelines
- PEP8
- Google Stlye Guides
Other useful resources:
GitHub projects:
Personal note: I tend to spend a lot of time determining the correct semantics and style to use in my MATLAB projects, and the community either a) is divided in their recommendations or b) does not provide formal documentation. So, my goal was to create something both for myself and others to reference.
Historically, MATLAB has used lowercase
for files in their developed toolboxes, with some instances of camelCase
or PascalCase
. To better distinguish user-defined files from MATLAB built-in, I follow camelCase
or snake_case
naming conventions. Moreover, I find it more clear for readability.
- Develop comprehensive style-guide
- Link relevant resources (style-guides, programming conventions, etc)
If you have any additional resources, recommendations, or proposed changes, please consider contributing by:
- Submitting an issue
- Fork and create a pull request with the desired change
All suggestions are encouraged and welcomed.
Please contact me if you have any questions or suggestions about the project.