






























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Arrays-and-Script notes engineering
Typology: Slides
1 / 38
This page cannot be seen from the preview
Don't miss anything!































EE201: Computer Applications. See Textbook Chapter 2 and Chapter 3.
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
-^
-^
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
a
=
[2 -
6]
a^
=
2
6
b
=
[3 -
-1]
b^
=
3
c
=
a +
b
c^
=
5
5
d
=
a -
b
d^
=
7
e
=
2*a
e^
=
4
12
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
け^
げ
こ
a
=
[
-4 6];
b
=
[
-1 -1];
c
=
a
b'
c^
=
4
c
=
sum(a
.*
b)
c^
=
4
c
=
dot(a,
b)
c^
=
4
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
ComplexNumbers
a =
7 +
4j
a =
7.0000 +
4.0000i
[theta,
rho]
= cart2pol(real(a),
imag(a))
theta =
rho
= 8.
rho
= abs(a)
% magnitude
of complex number
rho
= 8.
theta =
atan2(imag(a), real(a))
theta =
% atan
is
four
quadrant inverse
tangent
b =
3 +
4j
b =
3.0000 +
4.0000i
a+b ans
= 10.0000 +
8.0000i
a*b ans
= 5.0000 +
40.0000i
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
ぁ
ぁ
ぁ⡹⡩
ぁ⡹⡩
⡰
⡰^
⡩
⡨
〶
ぁ 〶⢀⡨
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
x = -2:0.01:5;>> f =
x.^
plot(x, f)
-^ -^
0
1
2
3
4
150 100 50 0 -50 -100 -
13
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
C = cell(3)C^
=
[]
[]
[]
[]
[]
[]
[]
[]
[]
D = cell(1, 3)D^
=
[]
[]
[]
A(1,1) =
{'Walden
Pond'};
A(1,2) =
{[1+2i 5+9i]};
A(2,1) =
{[60,72,65]};
A(2,2) =
{[55,57,56;54,56,55;52,55,53]};
AA^
=
'Walden
Pond'
[1x2 double]
[1x
double]
[3x3 double]
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
celldisp(A) A{1,1}
=
Walden
Pond
A{2,1}
= 60
72
65
A{1,2}
=
A{2,2}
= 55
57
56
54
56
55
52
55
53
B =
{[2,4],
[6,-9;3,5];
[7;2],
10}
B^
=
[1x
double]
[2x2 double]
[2x
double]
[^
10]
B{1,2} ans
=
6
5
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
student.name
= 'John
Smith';
student.SSN
=
'392-77-1786';
student.email
= '[email protected]';
student.exam_scores =
[67,75,84];
student student
=
name:
'John Smith' SSN:
'392-77-1786'
email:
exam_scores:
[
75
84]
student(2).name =
'Mary Jones';
student(2).SSN =
'431-56-9832';
student(2).email
= '[email protected]';
student(2).exam_scores
= [84,78,93];
student student
=
1x2 struct
array
with fields:
nameSSNemail exam_scores
Copyright © Dr. Mohammed Hawa
Electrical Engineering Department, University of Jordan
student(2) ans
name:
'Mary
Jones'
email:
exam_scores:
fieldnames(student) ans
= 'name''SSN''email''exam_scores'
max(student(2).exam_scores) ans
isstruct(student) ans