CHAPTER 2

image

Numbers, Operators, Variables and Functions

Numbers

The numerical scope of MATLAB is very wide. Integer, rational, real and complex numbers, which in turn can be arguments of functions giving rise to whole, rational, real and complex functions. Therefore, the complex variable is a treatable field in MATLAB. This chapter will look at the basic functionality of MATLAB.

Arithmetic operations in MATLAB are defined according to the standard mathematical conventions. The following table presents the syntax of basic arithmetic operations:

x + y

Sum

>> 4 + 8

Ans =

     12

x - y

Difference

>> 4 - 8

Ans =

     -4

x * y or x y

Product ...

Get MATLAB Mathematical Analysis now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.