In functionsĪvailable only when evaluation is paused. In the Live Editor,Īvailable for all code, whether it is saved or not. MATLAB continues running until the end of the file isĪvailable only for code that has been saved. Run to a specific line of code and pause. Run the code in the selected section, and then run all the code Run the code in the selected section, and then move to the next
This table describes different ways to run your code. When running individual sections, MATLAB does not save your file and the file does not have to be on your To run a section individually, it mustĬontain all the values it requires, or the values must exist in the MATLAB workspace. Running all of the code in the file at once. You can run your code file by either running each section individually or by The gray area to the left of your code and clear the Show Run Section To hide one or more of the margins, right-click This minimizes the grayĪrea to the left of your code. The Run Section, Run to Here, and Code Folding margins.
To maximize the space available for editing code in the Editor, you can hide For more information about when MATLAB might add a section break, see Behavior of Sections in FunctionsĪnd Behavior of Sections in Loops and Conditional Statements. You cannot remove sections breaks added by MATLAB.