Skip to content

Instantly share code, notes, and snippets.

@qin-yu
Created January 22, 2020 18:57
Show Gist options
  • Save qin-yu/61625f0beaa1d7bd852571f7ed9e6eaf to your computer and use it in GitHub Desktop.
Save qin-yu/61625f0beaa1d7bd852571f7ed9e6eaf to your computer and use it in GitHub Desktop.
How to format MATLAB files?

How to format MATLAB files?

  1. Go to the GitHub repo of MBeautifier and clone/download it to anywhere as a library/package for MATLAB.
  2. Add the root directory of MBeautifier to the MATLAB path, e.g. on MacOS:
  • Add the folder /path/to/MBeautifier to the beginning of the search path on a UNIX® system:
oldpath = path;
path('/path/to/MBeautifier',oldpath)
  1. Perform formatting on the currently active page of MATLAB Editor. Command:
MBeautify.formatCurrentEditorPage()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment