Language
Syntax Basics
1
Continue Long Statements on Multiple Lines ...................
1-2
Name=Value in Function Calls ...............................
1-3
Ignore Function Outputs ....................................
1-4
Variable Names ...........................................
1-5
Valid Names ...........................................
1-5
Conflicts with Function Names .............................
1-5
Case and Space Sensitivity ..................................
1-6
Choose Command Syntax or Function Syntax ...................
1-7
Command Syntax and Function Syntax .......................
1-7
Avoid Common Syntax Mistakes ............................
1-8
How MATLAB Recognizes Command Syntax ...................
1-8
Resolve Error: Undefined Function or Variable .................
1-10
Issue ...............................................
1-10
Possible Solutions ......................................
1-10
Program Components
2
MATLAB Operators and Special Characters ....................
2-2
Arithmetic Operators ....................................
2-2
Relational Operators .....................................
2-2
Logical Operators .......................................
2-2
Special Characters ......................................
2-3
String and Character Formatting ..........................
2-16
Array vs. Matrix Operations ................................
2-20
Introduction ..........................................
2-20
Array Operations ......................................
2-20
Matrix Operations .....................................
2-22
v
Contents
Précédent

- 5/1450

Suivant