CHAPTER 2

image

MATLAB Programming

2.1 MATLAB Programming

MATLAB can be used as a high-level programming language including data structures, functions, instructions for flow control, management of inputs/outputs and even object-oriented programming.

MATLAB programs are usually written into files called M-files. An M-file is nothing more than a MATLAB code (script) that executes a series of commands or functions that accept arguments and produce an output. The M-files are created using the text editor.

2.1.1 The Text Editor

The Editor/Debugger is activated by clicking on the create a new M-file button in the MATLAB desktop or by selecting File New ...

Get MATLAB Optimization Techniques 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.