Main Content

Editing Files Overview

MATLAB® Mobile™ allows you to create and edit MATLAB files (.m), Live Editor files (.mlx), and text files (.txt).

While you are editing files, MATLAB Mobile saves your changes automatically, at regular intervals. You can also save changes by running a file (MATLAB files only) or by navigating to a different view. An unsaved file in MATLAB Mobile has an asterisk next to the file name; for example, test.m*.

To create or edit files, go to the Files view or use the edit command at the MATLAB prompt.

Editing Features

Basic MATLAB Editing

MATLAB Mobile provides the following editing functionality for writing and modifying MATLAB files:

  • Cut, copy, and paste

  • Undo and Redo

  • Syntax highlighting

  • Auto indentation

  • Parentheses matching


MATLAB Mobile autosaves the file to the Cloud while you are editing. If the device is not connected to the Cloud, the file is saved locally. When the device is connected again, the file is autosaved to the Cloud and the local file is deleted.

Keyboard Support

MATLAB Mobile supports the use of an external keyboard for editing.

iOS Keyboard Shortcuts

Command + RRun file
Command + SSave file
Command + CCopy selected text
Command + VPaste selected text
Command + ZUndo
Command + Shift + ZRedo
Command + /Comment selected lines or the line where cursor is
Command + tUncomment selected lines or the line where cursor is
Command + TABAdd tab to the selected lines or to the line where cursor is
Command + Shift + TABRemove tab spaces from the selected lines or from the line where cursor is

These key combinations are supported when an iOS/Mac external hardware keyboard (for example, an Apple Bluetooth® keyboard) is connected to the iOS device. There are possibilities that a Windows® external keyboard can be connected to an iOS device, in which case these shortcuts are not supported.

Android Keyboard Shortcuts

Ctrl + RRun file
F5Run file
Ctrl + SSave file
Ctrl + CCopy selected text
Ctrl + VPaste selected text
Ctrl + XCut selected text
Ctrl + ZUndo
Ctrl + Shift + ZRedo
Ctrl + YRedo

These key combinations are supported when an external hardware keyboard (for example, a Windows Bluetooth keyboard) is connected to the Android® device.

File Editing Support

MATLAB Mobile supports the following functionality for file editing:

  • You can create, open, and edit only MATLAB (.m) files, Live Editor (.mlx) files, and text (.txt) files. Only MATLAB and Live Editor files can be run.

  • Using a phone, you can edit and run a Live Editor (.mlx) script, but you cannot create an .mlx file.

  • You can view other supported standard file types, such as JPG and PNG images and PDF.

  • Files of unsupported types are grayed out in the file browser and cannot be viewed or edited.

  • You can have only one file open at a time.

  • Some very large files can take a long time to open, or might not open at all. You might also experience performance degradation with these large files.

  • MATLAB Mobile autosaves a temporary local copy while you are editing.

File Size Limit

The file size limit for .m and .txt files is 300 KB.

The file size limit for .mlx files is 20 MB.


  • iOS Devices: You must have iOS version 11.0 or later to use the editor.

  • Android Devices: You must have Android version 6.0 or later to use the editor.

Related Examples

More About