You are on page 1of 20

Lecture | 02

1. Absolute number.
2. Imaginary number.
3. Complex Number
4. abs & angle ()
5. Array

Lecture | 02
Lecture | 02
Definitions:
The absolute number | x | of a real number x is the
non-negative value of x without regard to its sign. For
example, the absolute value of 5 is 5, and the
absolute value of −5 is also 5. The absolute value of a
number may be thought of as its distance from zero
along real number line.

Lecture | 02
‫لعدد الصحيح‬ ‫قيمته المطلقة‬
‫|‪|1‬‬ ‫‪1‬‬
‫|‪|3‬‬ ‫‪3‬‬
‫|‪|-7‬‬ ‫‪7‬‬
‫|‪|X‬‬ ‫‪X‬‬

‫|‪|1000‬‬ ‫‪1000‬‬

‫‪Lecture | 02‬‬
Lecture | 02
Definitions:
It’s a complex number that can be written as the
product of a real number on the one hand and an
imaginary unit on the other .
In other words, it is any negative number inside the
roots.

Lecture | 02
Lecture | 02
Definitions:
It is a number that contain two parts
The first part is a real unit.
The second part is a imaginary unit.
is any number written in the form:(a+bi)

Lecture | 01
For example:
3+2i is a complex number
in which:
3 is the real part.
2 is the imaginary part.

Lecture | 02
Lecture | 01
Lecture | 02
Complex number:
x=a+bi
a=2;b=5
x=2+5i

Absolute number:
c=root((2^2)+(5^2))
=Tan^(−1)(b/a)

Lecture | 02
Absolute number:
c=root((2^2)+(5^2))
=Tan^(−1)(b/a)

MATLAB:
abs(x)
angle(x)

Lecture | 02
Complex number:
x=2+5i

MATLAB:
x=2+5i;
n=complex(2,-7)
real(x); real(n)
imag(x); imag(n)
abs(x); abs(n)
angle(x); angle(n) Lecture | 02
Lecture | 02
Definitions:
It is a data structure consisting of a collection of
elements (values or variables), of same memory size,
each identified by at least one array index or key.
An array is stored such that the position of each
element can be computed from its index tuple by a
mathematical formula

Lecture | 02
Lecture | 02
Array:
a = [3 6 7];
b = [1 9 4];
c=a+b

Output:
c= 4 15 11

Lecture | 02
Array:
a = [3 6 7];
b = [1 9 4 5];
c = a(2) + b(4)

Output:
c= 11
Lecture | 02

You might also like