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

3<br />

Basic Program Components<br />

This chapter introduces some of the principal building blocks used in writing<br />

<strong>MATLAB</strong> programs.<br />

Variables (p. 3-3)<br />

Keywords (p. 3-14)<br />

Special Values (p. 3-15)<br />

Operators (p. 3-17)<br />

<strong>MATLAB</strong> Expressions (p. 3-28)<br />

Regular Expressions (p. 3-31)<br />

Comma-Separated Lists (p. 3-80)<br />

Program Control Statements<br />

(p. 3-88)<br />

Guidelines for creating variables;<br />

global and persistent variables;<br />

variable scope and lifetime<br />

Reserved words that you should<br />

avoid using<br />

Functions that return constant<br />

values, like pi or inf<br />

Arithmetic, relational, and logical<br />

operators<br />

Executing user-supplied strings;<br />

constructing executable strings,<br />

shell escape functions<br />

A versatile way to search and replace<br />

character strings<br />

Using lists with structures and cell<br />

arrays to simplify your code<br />

Using statements such as if, for,<br />

and try-catch to control the code<br />

path your program follows

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

Saved successfully!

Ooh no, something went wrong!