MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

Update Code with Figure Changes


When modifying output figures in live scripts, changes to the figure are not automatically
added to the script. With each interaction, MATLAB generates the code needed to
reproduce the interactions and displays this code either underneath or to the right of the
figure. Use the Update Code button to add the generated code to your script. This
ensures that the interactions are reproduced the next time you run the live script.

For example, in the live script patients.mlx, after zooming in on patients with a height
of 64, click the Update Code button. MATLAB adds the generated code after the line
containing the code for creating the plot.

19 Live Scripts and Functions

Free download pdf