Biomedical Engineering Reference
In-Depth Information
>>
3
*
(6
4)
gives
ans
¼
6
The first calculation is 6
4 and then this result is multiplied by 3.
Trigonometric functions are calculated in MATLAB with the angle in radians. For exam-
ple, to evaluate sin (45
), we enter
>>
sin (pi/4)
which gives
ans
¼
0.7071
EXAMPLE PROBLEM A.1
Solve the following set of simultaneous equations for
i
1
,
...
,
i
5
.
4
i
1
i
2
i
3
i
4
i
5
¼
240
i
1
þ
8
i
2
i
3
þ
0
i
4
þ
0
i
5
¼
0
i
1
i
2
þ
5
i
3
i
4
þ
0
i
5
¼
0
i
1
þ
0
i
2
i
3
þ
5
i
4
i
5
¼
0
i
1
þ
0
i
2
þ
0
i
3
i
4
þ
8
i
5
¼
0
Solution
The simultaneous equations are written in matrix format as
Ai
¼
F
with
2
4
3
5
2
4
3
5
2
4
3
5
4
1
1
1
1
i
1
i
2
i
3
i
4
i
5
240
0
0
0
0
18
100
A
¼
1
15
10
;
i
¼
;
F
¼
10
15
1
100
18
Column vector
i
is easily solved by using the reverse division operation on the previous equa-
tion, that is,
A
n
Ai
¼
i
¼
A
n
F
The MATLAB commands to solve for
i
are
>>
A
¼
[4
1
1
1
1;
18
100;
1
15
10;
10
15
1;
100
18];
>>
F
¼
[240;0;0;0;0];
>>
i
¼
A\F
Continued