Editing Files Overview
MATLAB® Mobile™ allows you to create, edit, and run MATLAB scripts and live scripts.
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
Autosave
As you edit a file, MATLAB Mobile periodically autosaves the file to your MATLAB Drive™. If your connection to MATLAB Drive is interrupted, until the connection is restored live script files are not autosaved, but plain text files are temporarily autosaved to your local device.
You can also trigger an autosave by running a MATLAB file, 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*.
Keyboard Support
MATLAB Mobile supports the use of an external keyboard for editing.
iOS Keyboard Shortcuts
| Command | Action |
|---|---|
| Command + R | Run file |
| Command + S | Save file |
| Command + C | Copy selected text |
| Command + V | Paste selected text |
| Command + Z | Undo |
| Command + Shift + Z | Redo |
| Command + / | Comment selected lines or the line where cursor is |
| Command + t | Uncomment selected lines or the line where cursor is |
| Command + TAB | Add tab to the selected lines or to the line where cursor is |
| Command + Shift + TAB | Remove 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
| Command | Action |
|---|---|
| Ctrl + R | Run file |
| F5 | Run file |
| Ctrl + S | Save file |
| Ctrl + C | Copy selected text |
| Ctrl + V | Paste selected text |
| Ctrl + X | Cut selected text |
| Ctrl + Z | Undo |
| Ctrl + Shift + Z | Redo |
| Ctrl + Y | Redo |
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 MATLAB script and live script files, among other standard file formats. Only MATLAB scripts and live scripts can be run.
You can create a live script on a tablet, but you cannot create a live script on a phone.
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 size limit for MATLAB script files is 300 KB.
The size limit for live script files is 20 MB.