.MLX File Extension
MATLAB Live Code File
3.7 | 21 Votes
What is an MLX file?
An MLX file contains a live script or function in the MATLAB Live Code format, which includes MATLAB code, embedded output, equations, images, and formatted text. The MathWorks MATLAB, an application for mathematical computations and data analysis, creates and opens MLX files. MATLAB users save live scripts and functions as MLX files to create interactive documents by combining commands and their output with graphics and formatted text.
MATLAB provides many tools to analyze data, develop algorithms, create models, build apps, and more. One feature is Live Code, which allows users, such as engineers and scientists, to build interactive documents, such as graphs for visualizing fluid temperature data throughout a day, or a tool for calculating heart rate from electrocardiogram data.
Additionally, The MathWorks introduced MLX files to extend .M source code files. Some of their differences:
- MLX files are saved in the Live Code format, an extension of the Zip format that stores content in separate .XML files. M files store plain text.
- MLX files are interoperable across different locales, whereas characters in M files are not compatible across all locales.
- MLX files are backward and forward compatible.
How to create an MLX file with MATLAB
To create an MLX file:
- Select New in the "EDITOR" tab.
- Choose the type of file ("Live Script," "Live Function," etc.).
- Select Save → Save As....
- Name the file and choose the save location.
- Select Save.
How to open an MLX file
You can open an MLX file with The MathWorks MATLAB (multiplatform). To open an MLX file, select Open from the "HOME" or "EDITOR" tabs, choose the MLX file, then select Open.
How to convert an MLX file
MATLAB can convert an MLX file to an M source code file. To do this, select File → Save → Save As... in the "EDITOR" tab. Then, select "MATLAB Code files (*.m)" as the "Save as type".