Chapter 8. Writing Programs and Functions

Learning Objectives

  • Study of MATLAB® Editor and different features of Editor Menu bar and Toolbar.

  • Learn MATLAB programming fundamentals and types of M-files, i.e., script files and function files.

  • Learn how to write a function M-file.

  • Learn about the concepts of argument passing, function workspace and types of functions.

  • Use of Function Handle using @ operator and strfunc function.

  • Know about different types of errors encountered in programs and methods/commands, to detect and correct them.

  • Use the various features of MATLAB debugger for debugging runtime errors in program files.

Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] 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.