TI Responsi Nomor 4 : MATLAB
SOAL 4 : MATLAB
OUTPUT LISTING
>> A=[2,7,3,5;-2,2,1,4;0,1,9,2;3,4,2,1]
A =
2 7 3 5
-2 2 1 4
0 1 9 2
3 4 2 1
>> B=5*A
B =
10 35 15 25
-10 10 5 20
0 5 45 10
15 20 10 5
>> inv(A)
ans =
17.0000 -16.2857 1.0000 -21.8571
-16.0000 15.2857 -1.0000 20.8571
-2.0000 1.8571 -0.0000 2.5714
17.0000 -16.0000 1.0000 -22.0000
>> det(A)
ans =
-7
>> A'
ans =
2 -2 0 3
7 2 1 4
3 1 9 2
5 4 2 1
>> C=A^3
C =
55 383 614 378
6 71 144 78
42 248 853 292
40 254 407 247
>> D=A+B
D =
12 42 18 30
-12 12 6 24
0 6 54 12
18 24 12 6
>> n1=[2;1;3]
n1 =
2
1
3
>> n2=[-5;2;-4]
n2 =
-5
2
-4
>> n3=[2;-4;-6]
n3 =
2
-4
-6
>> b=[7;3;5]
b =
7
3
5
>> A=[n1,n2,n3]
A =
2 -5 2
1 2 -4
3 -4 -6
>> det(A)
ans =
-46
>> x1=[b,n2,n3]
x 1=
7 -5 2
3 2 -4
5 -4 -6
>> det(x1)
ans =
-230
>> x=det(x1)/det(A)
x =
5
>> y1=[a1,b,a3]
y 1=
2 7 2
1 3 -4
3 5 -6
>> det(y1)
ans =
-46
>> y=det(y1)/det(A)
y =
1
>> z1=[a1,a2,b]
z 1=
2 -5 7
1 2 3
3 -4 5
>> det(z1)
ans =
-46
>> z=det(z1)/det(A)
z =
1
>> c1=[2;1;3]
c1 =
2
1
3
>> c2=[3;1;4]
c2 =
3
1
4
>> c3=[1;2;3]
c3 =
1
2
3
>> d=[6;4;9]
d =
6
4
9
>> C=[c1,c2,c3]
C =
2 3 1
1 1 2
3 4 3
>> det(C)
ans =
0
>> x1=[d,c2,c3]
x 1=
6 3 1
4 1 2
9 4 3
>> det(x1)
ans =
-5
>> x=det(x1)/det(C)
x =
-Inf
>> y1=[c1,d,c3]
y 1=
2 6 1
1 4 2
3 9 3
>> det(y1)
ans =
3
>> y=det(y1)/det(C)
y =
Inf
>> z1=[c1,c2,d]
z 1=
2 3 6
1 1 4
3 4 9
>> det(z1)
ans =
1
>> z=det(z1)/det(C)
z =
Inf



0 Response to "TI Responsi Nomor 4 : MATLAB"
Posting Komentar