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 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.