MATLAB Programming

MATLAB Programming MATLAB Programming

cda.psych.uiuc.edu
from cda.psych.uiuc.edu More from this publisher
23.06.2015 Views

2 Data Types 2-120

3 Basic Program Components This chapter introduces some of the principal building blocks used in writing MATLAB programs. Variables (p. 3-3) Keywords (p. 3-14) Special Values (p. 3-15) Operators (p. 3-17) MATLAB Expressions (p. 3-28) Regular Expressions (p. 3-31) Comma-Separated Lists (p. 3-80) Program Control Statements (p. 3-88) Guidelines for creating variables; global and persistent variables; variable scope and lifetime Reserved words that you should avoid using Functions that return constant values, like pi or inf Arithmetic, relational, and logical operators Executing user-supplied strings; constructing executable strings, shell escape functions A versatile way to search and replace character strings Using lists with structures and cell arrays to simplify your code Using statements such as if, for, and try-catch to control the code path your program follows

2 Data Types<br />

2-120

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!