MATLAB Programming Fundamentals - MathWorks
Operation Instructions Run the code in the selected section. Click the blue bar to the left of the section. OR On the Live Edito ...
Debug Code in the Live Editor To diagnose problems in your live scripts or functions, debug your code in the Live Editor. There ...
To display the output of the rand function at line 2, remove the semi-colon at the end of the line. To display line numbers in t ...
When MATLAB pauses, the Run button in the Live Editor tab changes to a Continue button. The Live Editor indicates the line at wh ...
TipIt is a good practice to avoid modifying a file while MATLAB is paused. Changes that are made while MATLAB is paused do not r ...
You also can view the value of a variable by typing the variable name in the Command Window. For example, to see the value of th ...
every time you are done debugging. The Live Editor automatically ends the debugging session when you save. Step Into Functions W ...
the workspace, click the function in the function call stack. MATLAB opens the function in the Live Editor and changes the curre ...
To clear all breakpoints in the file, select Clear All in File. To clear all breakpoints in all files, select Clear All. Breakpo ...
When the Editor dialog box opens, enter a condition and click OK. A condition is any valid MATLAB expression that returns a logi ...
See Also More About “Run Sections in Live Scripts” on page 19-14 See Also ...
Modify Figures in Live Scripts You can modify figures interactively in the Live Editor. Use the provided tools to explore data a ...
Gender = categorical(Gender); scatter(Height(Gender=='Female'),Weight(Gender=='Female')); hold on scatter(Height(Gender=='Male') ...
Update Code with Figure Changes When modifying output figures in live scripts, changes to the figure are not automatically added ...
xlim([61.31 69.31]) ylim([116.7 183.3]) If MATLAB is unable to determine where to place the generated code, the Update Code butt ...
• Line, Arrow, Text Arrow, Double Arrow — Add a line or arrow annotation to the figure. Draw the arrow from tail to head. To mov ...
grid on legend({'Female','Male'}) title('Weight vs Height') xlabel('Height') ylabel('Weight') annotation('textarrow',[0.455 0.39 ...
the Subplot button. You only can add additional subplots to a figure if the figure contains one subplot. If a figure contains mu ...
In the newly created figure, click the Update Code button. The live script now contains the code needed to reproduce the two sub ...
1 Add titles to each subplot — In the Annotations section, select Title. A blue rectangle appears in each subplot prompting you ...
«
29
30
31
32
33
34
35
36
37
38
»
Free download pdf