0% found this document useful (0 votes)
41 views6 pages

Tugas Mid Mega

The document contains 4 math problems involving matrices: 1) Calculating the volume of a cylinder using radius, height, and pi 2) Adding and multiplying two 5x5 matrices, calculating their inverse, determinant, and transpose 3) Combining two matrices into one and creating another matrix from copies of one matrix 4) Solving a system of 3 linear equations by multiplying the inverse of the coefficient matrix with the constant vector

Uploaded by

mega
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views6 pages

Tugas Mid Mega

The document contains 4 math problems involving matrices: 1) Calculating the volume of a cylinder using radius, height, and pi 2) Adding and multiplying two 5x5 matrices, calculating their inverse, determinant, and transpose 3) Combining two matrices into one and creating another matrix from copies of one matrix 4) Solving a system of 3 linear equations by multiplying the inverse of the coefficient matrix with the constant vector

Uploaded by

mega
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Soal1

%program menghitung volume silinder


%jari-jari= r
%tinggi = t
%volume = V
%pi = 3.14
%........................

r = 10;
t = 21;
pi = 3.14;
V = pi * r^2 * t

V=

6594

Soal 2

%operasi penjumlahan dan perkalian 2 matriks ordo 5 x 5


%Invers = Inv, Determinan = Det, Tranpose = T
%oleh Megawati F12115019

A=[2 1 4 5 7; 4 5 7 6 8; 4 5 6 7 3; 3 3 5 4 6; 5 6 7 4 3]
B=[1 2 3 4 6; 3 4 5 6 7; 3 5 7 8 5; 2 4 5 6 7; 3 2 2 4 5]
C=A+B
In=inv(C)
Det=det(C)
T=C'
%...................
D=A*B
Inv=inv(D)
Det=det(D)
T=D'

A=

2 1 4 5 7

4 5 7 6 8

4 5 6 7 3

3 3 5 4 6

5 6 7 4 3
B=

1 2 3 4 6

3 4 5 6 7

3 5 7 8 5

2 4 5 6 7

3 2 2 4 5

C=

3 3 7 9 13

7 9 12 12 15

7 10 13 15 8

5 7 10 10 13

8 8 9 8 8

In =

0.2535 -0.3310 -0.0423 -0.1056 0.4225

-0.4155 2.8063 -0.0141 -2.2852 -0.8592

0 -4.0000 0 4.0000 1.0000

0.1549 1.4366 0.1408 -1.6479 -0.4085

0.0070 0.5880 -0.0845 -0.4613 -0.1549


Det =

284.0000

T=

3 7 7 5 8

3 9 10 7 8

7 12 13 10 9

9 12 15 10 8

13 15 8 13 8

D=

48 62 78 104 109

76 103 132 170 176

60 92 120 148 153

53 71 91 118 122

61 91 120 148 150

Inv =

-1.2143 0.2857 0.0714 1.2857 -0.5714

4.8247 4.4156 -1.5779 -12.0390 2.7143


-3.7727 -1.9091 1.0455 7.2727 -2.0000

2.6331 0.1104 -0.8019 -3.5260 1.6429

-2.0130 -1.3766 0.8831 4.4416 -1.4286

Det =

308.0000

T=

48 76 60 53 61

62 103 92 71 91

78 132 120 91 120

104 170 148 118 148

109 176 153 122 150

Soal 3

%penggabungan matriks A dan B


%oleh Megawati F12115019

A=[4 8; 2 4]
B=[1 1; 1 -1]
C=[A B]
W=[B B; B -B]

A=

4 8

2 4
B=

1 1

1 -1

C=

4 8 1 1

2 4 1 -1

W=

1 1 1 1

1 -1 1 -1

1 1 -1 -1

1 -1 -1 1

Soal 4

%pemecahan solusi persamaan linear 3 variabel


%oleh megawati F12115019

A=[1 2 -3; 4 5 6; 7 8 9]
b=[-7; 11; 17]
x=inv(A)*b

A=
1 2 -3

4 5 6

7 8 9

b=

-7

11

17

x=

1.0000

-1.0000

2.0000

You might also like