MATLAB also autocompletes comments, character vectors, and strings when split across
two lines. To escape out of an autocompletion, press Ctrl+Z or the Undo button.
Autocompletions are enabled by default. To disable them, see “Editor/Debugger
Autocoding Preferences”.
When adding or editing code, you can select and edit a rectangular area of code (also
known as column selection or block edit). This is useful if you want to copy or delete
several columns of data (as opposed to rows), or if you want to edit multiple lines at one
time. To select a rectangular area, press the Alt key while making a selection.
For example, select the second column of data in A.
Type 0 to set all the selected values to 0.
Run Code
To run the code, click the vertical striped bar to the left of the code. Alternatively, go to
the Live Editor tab and click Run. While your program is running, a status indicator
appears at the top left of the Editor window. A gray blinking bar to the left of a line of
code indicates the line that MATLAB is evaluating. To navigate to the line MATLAB is
evaluating, click the status indicator.
Create Live Scripts in the Live Editor