8

Matlab Debugging, Profiling, and Code Indentation

Chapter Outline

Lesson 8.1 Matlab Debugging

Lesson 8.2 Debugging Matlab Functions

Lesson 8.3 Advanced Matlab Debugging Tools

Lesson 8.4 The Matlab Profiler Tool

Lesson 8.5 Matlab Code Indentation

Answers to Selected Exercises

Lesson 8.1 Matlab Debugging

Objectives

• To learn the differences between syntax errors and runtime errors.

• To learn how to debug Matlab script files.

• To learn how to use the Breakpoint tool to debug Matlab code.

• To learn how to run one line of a program using the Step tool.

Topics

8.1.1 Syntax and Runtime Errors

8.1.1.1 Syntax Errors

8.1.1.2 Runtime Errors

8.1.2 Debugging Matlab Code

8.1.2.1 Setting Up a Breakpoint

8.1.2.2 Stepping Through the Program

8.1.1 Syntax ...

Get MATLAB® by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.