Program Matriks (Kelas 1M)

Program matriks bagi kelas 1M

  1. Silahkan menuliskan program matriks menggunakan program matematika, seperti matlab, mathematics wolfram dan sebagainya di bagian komentar.
  2. Jangan lupa menuliskan nama dan NIM anda.
  3. Ingat perhatikan baik-baik kelas anda, selain program / koding, tuliskan keluaran/hasil eksekusinya dari program yang anda tulis.

74 Responses

  1. Muhammad Isa Kustiyo
    10.11.4552
    Menggunakan program MATLAB 7.10

    no 1)
    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    jawaban
    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    no 2)
    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    jawaban
    >> a*b

    ans =

    2

    no 3)
    >>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    jawaban
    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13
    4 6 11

    no 4)
    >> [3 0;0 2]*[1 2 3;4 5 6]

    jawaban
    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    jawaban
    ans =

    2 6 3
    8 15 6

  2. Nama: Muhammad Isa Kustiyo
    NIM: 10.11.4552
    Menggunakan program MATLAB 7.10

    no 1)
    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    jawaban
    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    no 2)
    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    jawaban
    >> a*b

    ans =

    2

    no 3)
    >>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    jawaban
    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13
    4 6 11

    no 4)
    >> [3 0;0 2]*[1 2 3;4 5 6]

    jawaban
    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    jawaban
    ans =

    2 6 3
    8 15 6

  3. Nama : Marliya Rahmawati Yaas
    Nim : 10.11.4569
    Kelas : 1N

    >> a=[1 2 3;4 5 6]
    a =
    1 2 3
    4 5 6
    …>> b=[7 8 9;0 1 2]
    b =
    7 8 9
    0 1 2
    >> a+b
    ans =
    8 10 12
    4 6 8
    >> a-b
    ans =
    -6 -6 -6
    4 4 4
    No,2.
    >> a= [1 0 -1]
    a =
    1 0 -1
    >> b= [4;3;2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2
    3.
    >>A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1
    >> A*C
    ans =
    1 1 2
    1 3 5
    >> B*C
    ans =
    2 8 13 4 6 11
    No.4.
    >> [3 0;0 2]*[1 2 3;4 5 6]
    ans =
    3 6 9
    8 10 12
    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]
    ans =
    2 6 3
    8 15 6

  4. Nama : Hermawan Agus Prasetyo
    NIM : 10.11.4499
    Kelas : S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  5. JERI WANDANA
    10.11.4526

    Nomor 1
    >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    >>

    Nomor 2
    >> a=[1,0,-1]

    a =

    1 0 -1

    >> b=[4,3,2]

    b =

    4 3 2

    >> dot(a,b)

    ans =

    2

    >>

    Nomor 3
    >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> AB=A*B

    AB =

    2 3
    6 4

    >> BA=B*A

    BA =

    5 3
    5 1

    >> AC=A*C

    AC =

    1 1 2
    1 3 5

    >> CA=C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >>

    Nomor 4
    >> [3 0;0 2]

    ans =

    3 0
    0 2

    >> [1 2 3;4 5 6]

    ans =

    1 2 3
    4 5 6

    >> [3 0;0 2]*[1 2 3; 4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]

    ans =

    1 2 3
    4 5 6

    >> [2 0 0;0 3 0;0 0 1]
    ans =

    2 0 0
    0 3 0
    0 0 1

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  6. Nama : Hermawan Agus Prasetyo
    NIM : 10.11.4499
    Kelas : S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  7. Nama : Cahyo Ageng Pamungkas
    NIM : 10.11.4525
    Kelas : S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  8. HELMY ASHARI
    10.11.4535
    S1-TI-1M

    1) >> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2) >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3) >>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4) >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  9. NAMA : MUHAMMAD YUSUF
    NIM : 10.11.4469
    KELAS : S1 TI 1M
    JAWABANNYA :
    .1.
    >> a=[1 2 3;4 5 6]
    a =
    1 2 3
    4 5 6
    >> b=[7 8 9;0 1 2]
    b =
    7 8 9
    0 1 2
    >> a+b
    ans =
    8 10 12
    4 6 8
    >> a-b
    ans =
    -6 -6 -6
    4 4 4

    .2.
    >> a= [1 0 -1]
    a =
    1 0 -1
    >> b= [4;3;2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2

    .3.
    >>A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1

    >> A*C
    ans =
    1 1 2
    1 3 5
    >> B*C
    ans =
    2 8 13 4 6 11

    .4.
    >> [3 0;0 2]*[1 2 3;4 5 6]
    ans =
    3 6 9
    8 10 12
    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]
    ans =
    2 6 3
    8 15 6

  10. >> a = [1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >>b = [7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >>a + b

    ans =

    8 10 12
    4 6 8

    >>a – b

    ans =

    -6 -6 -6
    4 4 4

  11. NAMA : DEDE FANDILLAH
    NIM : 10.11.4515

    nomor 1 >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    nomor 2>> A = [1 0 -1]

    A =

    1 0 -1

    >> B = [4;3;2]

    B =

    4
    3
    2

    >> [A*B]

    ans =

    2

    nomor 3>> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    nomor 4>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  12. Nama : SURYAWAN PRIANTORO
    NIM : 10.11.4533
    Kelas : 1M

    1.

    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.

    >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.

    >> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> b*c

    ans =

    2 8 13
    4 6 11

    5.

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  13. NIM : 10.11.4522
    Nama : Soraya Inayah Fidran

    1 >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    2 >> A = [1 0 -1]

    A =

    1 0 -1

    >> B = [4;3;2]

    B =

    4
    3
    2

    >> [A*B]

    ans =

    2

    3 >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    4 >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >> jika ada kesalahan mohon koreksi nya pak , wassalam

  14. Nama : Rakhmat Solihin
    NIM : 10.11.4507
    Kelas : SI TI 1M
    No.1.
    >> a=[1 2 3;4 5 6]
    a =
    1 2 3
    4 5 6
    >> b=[7 8 9;0 1 2]
    b =
    7 8 9
    0 1 2
    >> a+b
    ans =
    8 10 12
    4 6 8
    >> a-b
    ans =
    -6 -6 -6
    4 4 4

    No,2.
    >> a= [1 0 -1]
    a =
    1 0 -1
    >> b= [4;3;2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2
    .3.
    >>A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1
    >> A*C
    ans =
    1 1 2
    1 3 5
    >> B*C
    ans =
    2 8 13 4 6 11
    No.4.
    >> [3 0;0 2]*[1 2 3;4 5 6]
    ans =
    3 6 9
    8 10 12
    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]
    ans =
    2 6 3
    8 15 6

  15. NAMA : MUHAMMAD YUSUF
    NIM : 10.11.4469
    KELAS : SI TI 1M
    .1.
    >> a=[1 2 3;4 5 6]
    a =
    1 2 3
    4 5 6
    >> b=[7 8 9;0 1 2]
    b =
    7 8 9
    0 1 2
    >> a+b
    ans =
    8 10 12
    4 6 8
    >> a-b
    ans =
    -6 -6 -6
    4 4 4

    ,2.
    >> a= [1 0 -1]
    a =
    1 0 -1
    >> b= [4;3;2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2
    .3.
    >>A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1
    >> A*C
    ans =
    1 1 2
    1 3 5
    >> B*C
    ans =
    2 8 13 4 6 11
    .4.
    >> [3 0;0 2]*[1 2 3;4 5 6]
    ans =
    3 6 9
    8 10 12
    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]
    ans =
    2 6 3
    8 15 6

  16. 1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  17. Nama : Rakhmat Solihin
    NIM : 10.11.4507
    Kelas : SI TI 1M

    No.1.
    >> a=[1 2 3;4 5 6]
    a =
    1 2 3
    4 5 6
    >> b=[7 8 9;0 1 2]
    b =
    7 8 9
    0 1 2
    >> a+b
    ans =
    8 10 12
    4 6 8
    >> a-b
    ans =
    -6 -6 -6
    4 4 4

    No,2.
    >> a= [1 0 -1]
    a =
    1 0 -1
    >> b= [4;3;2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2
    No.3.
    >>A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1
    >> A*C
    ans =
    1 1 2
    1 3 5
    >> B*C
    ans =
    2 8 13 4 6 11

    No.4.
    >> [3 0;0 2]*[1 2 3;4 5 6]
    ans =
    3 6 9
    8 10 12
    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]
    ans =
    2 6 3
    8 15 6

  18. 1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  19. Nama : Akhmad Nur Faosin
    NIM : 10.11.4509

    Nomor 1:
    >> A=[1 2 3
    4 5 6]

    A =

    1 2 3
    4 5 6

    >> B=[7 8 9
    0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    Nomor 2:
    >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4
    3
    2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    Nomor 3:
    >> A=[1 0
    1 1]

    A =

    1 0
    1 1

    >> B=[2 3
    4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2
    0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.
    Nomor 5:
    >> A=[3 0
    0 2]

    A =

    3 0
    0 2

    >> B=[1 2 3
    4 5 6]

    B =

    1 2 3
    4 5 6

    >> C=[1 2 3
    4 5 6]

    C =

    1 2 3
    4 5 6

    >> D=[2 0 0
    0 3 0
    0 0 1]

    D =

    2 0 0
    0 3 0
    0 0 1

    >> A*B

    ans =

    3 6 9
    8 10 12

    >> C*D

    ans =

    2 6 3
    8 15 6

  20. Nama : Catur Prio Pambudi
    NIM : 10.11.4491

    (1)

    >> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    (2)

    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    (3)

    >>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    (4)

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  21. Nama: Pandu Yudistira Nugraha
    NIM : 10.11.4508

    1. >> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2. >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3. >>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4. >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  22. 1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  23. 1)>> a=[1 2 3;4 5 6]

    a =
    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =
    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  24. Nama : Ela Jamilah
    NIM : 10.11.4514

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  25. 1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  26. NAMA : OKY KLINSTON TAMBUN
    NIM : 10.11.4494
    KELAS : S1 TI – 1M

    >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    >> a = [1 0 -1]

    a =

    1 0 -1

    >> b = [4 3 2]

    b =

    4 3 2

    >> [1.*4 + 0.*3 + -1.*2]

    ans =

    2

    >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    >> [C*A]
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  27. 1) a=[1 2 3;4 5 6]

    a = 1 2 3
    4 5 6

    b=[7 8 9;0 1 2]

    b = 7 8 9
    0 1 2

    a+b

    hasil = 8 10 12
    4 6 8

    a-b

    hasil=-6 -6 -6
    4 4 4

    2) a= [1 0 -1]

    a =1 0 -1

    b= [4;3;2]

    b =4
    3
    2

    a*b

    hasil = 2

    3) A=[1 0;1 1]

    A =
    1 0
    1 1

    B=[2 3;4 1]

    B =
    2 3
    4 1

    C=[1 1 2;0 2 3]

    C =
    1 1 2
    0 2 3

    A*B

    hasil=

    2 3
    6 4

    B*A

    hasil =

    5 3
    5 1

    A*C

    hasli=

    1 1 2
    1 3 5

    B*C

    hasil =

    2 8 13 4 6 11

    4) [3 0;0 2]*[1 2 3;4 5 6]

    hasil =

    3 6 9
    8 10 12

    [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    hasil =

    2 6 3
    8 15 6

    nama: Muhammad Usman Rosyidi
    NIM : 10.11.4489
    Kelas : S1 TI 1M

  28. NAMA : FENDI PRIYANTO
    NIM : 10.11.4488
    KELAS : SI TI / M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3

    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9

    0 1 2

    >> a+b

    ans =

    8 10 12

    4 6 8

    >> a-b

    ans =

    -6 -6 -6

    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4

    …3

    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0

    1 1

    >> B=[2 3;4 1]

    B =

    2 3

    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2

    0 2 3

    >> A*B

    ans =

    2 3

    6 4

    >> B*A

    ans =

    5 3

    5 1

    >> A*C

    ans =

    1 1 2

    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9

    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3

    8 15 6

  29. Nama : Teguh Yudha Setiawan
    Kelas : S1-TI 1M
    NIM : 10.11.4505

    1.)
    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.)
    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.)
    >>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4.)
    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  30. 1) a=[1 2 3;4 5 6]

    a = 1 2 3
    4 5 6

    b=[7 8 9;0 1 2]

    b = 7 8 9
    0 1 2

    a+b

    hasil = 8 10 12
    4 6 8

    a-b

    hasil=-6 -6 -6
    4 4 4

    2) a= [1 0 -1]

    a =1 0 -1

    b= [4;3;2]

    b =4
    3
    2

    a*b

    hasil = 2

    3) A=[1 0;1 1]

    A =
    1 0
    1 1

    B=[2 3;4 1]

    B =
    2 3
    4 1

    C=[1 1 2;0 2 3]

    C =
    1 1 2
    0 2 3

    A*B

    hasil=

    2 3
    6 4

    B*A

    hasil =

    5 3
    5 1

    A*C

    hasli=

    1 1 2
    1 3 5

    B*C

    hasil =

    2 8 13 4 6 11

    4) [3 0;0 2]*[1 2 3;4 5 6]

    hasil =

    3 6 9
    8 10 12

    [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    hasil =

    2 6 3
    8 15 6

    nama : Muhammad Usman Rosyidi
    NIM: 10.11.4489

  31. Nama :Teguh Yudha Setiawan
    Kelas :S1-TI 1M
    NIM : 10.11.4505

    1.)
    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.)
    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.)
    >>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4.)
    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  32. Nama : Yusiana Pambaruni
    NIM : 10.11.4497
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  33. Yudi Kurniawan
    10.11.4541
    S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  34. Nur cholis
    10.11.4545
    S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  35. NAMA : ALAN DARMASAPUTRA
    NIM : 10.11.4495
    KELAS : SI TI M

    >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    >> a = [1 0 -1]

    a =

    1 0 -1

    >> b = [4 3 2]

    b =

    4 3 2

    >> [1.*4 + 0.*3 + -1.*2]

    ans =

    2

    >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    >> [C*A]
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  36. NAMA : senja permata dewanti
    NIM : 10.11.4511
    KELAS : SI TI M

    >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    >> a = [1 0 -1]

    a =

    1 0 -1

    >> b = [4 3 2]

    b =

    4 3 2

    >> [1.*4 + 0.*3 + -1.*2]

    ans =

    2

    >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    >> [C*A]
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  37. Banter Prayogo
    10.11.4470
    S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  38. Nama : Mahasin Ahmad Alfaqh
    NIM : 10.11.4530
    kelas : S1 TI 1M

    1. >> A=[1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B=[7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    2. >> A=[1 0 -1]

    A =

    1 0 -1

    >> B=[4;3;2]

    B =

    4
    3
    2

    >> A*B

    ans =

    2

    3. >> A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    5. >> A=[3 0;0 2]

    A =

    3 0
    0 2

    >> B=[1 2 3;4 5 6]

    B =

    1 2 3
    4 5 6

    >> C=[2 0 0;0 3 0;0 0 1]

    C =

    2 0 0
    0 3 0
    0 0 1

    >> A*B

    ans =

    3 6 9
    8 10 12

    >> B*C

    ans =

    2 6 3
    8 15 6

  39. NAMA : GANI ANGGORO
    NIM : 10.11.4510
    KELAS :SI TI M
    >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    >> a = [1 0 -1]

    a =

    1 0 -1

    >> b = [4 3 2]

    b =

    4 3 2

    >> [1.*4 + 0.*3 + -1.*2]

    ans =

    2

    >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    >> [C*A]
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  40. Nama : Nurul Qarama
    NIM : 10.11.4498
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  41. Wahyu Adi Setyawan
    10.11.4478
    S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  42. Nama : Dyta Romania
    NIM : 10.11.4500
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  43. Nama Rizky Aprio Prasetyo
    NIM 10.11.4496
    Kelas S1 TI 1M

    1. >> A=[1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B=[7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    2. >> A=[1 0 -1]

    A =

    1 0 -1

    >> B=[4;3;2]

    B =

    4
    3
    2

    >> A*B

    ans =

    2

    3. >> A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    5. >> A=[3 0;0 2]

    A =

    3 0
    0 2

    >> B=[1 2 3;4 5 6]

    B =

    1 2 3
    4 5 6

    >> C=[2 0 0;0 3 0;0 0 1]

    C =

    2 0 0
    0 3 0
    0 0 1

    >> A*B

    ans =

    3 6 9
    8 10 12

    >> B*C

    ans =

    2 6 3
    8 15 6

  44. Muhamad Amirudin Fauzi
    10.11.4479
    S1TI/1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  45. NAMA : DIAN NUR A.
    NIM : 10.11.4516
    KELAS : S1 TI-1M

    >> A = [1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A + B]

    ans =

    8 10 12
    4 6 8

    >> [A – B]

    ans =

    -6 -6 -6
    4 4 4

    >> a = [1 0 -1]

    a =

    1 0 -1

    >> b = [4 3 2]

    b =

    4 3 2

    >> [1.*4 + 0.*3 + -1.*2]

    ans =

    2

    >> A = [1 0;1 1]

    A =

    1 0
    1 1

    >> B = [2 3;4 1]

    B =

    2 3
    4 1

    >> C = [1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    >> [A*C]

    ans =

    1 1 2
    1 3 5

    >> [C*A]
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

    >>

  46. Nama : Rut Merilene H
    NIM : 10.11.4474
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  47. Bima Aditya Rahayu
    10.11.4476
    S1 TI 1M

    1)>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)>> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)>>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13 4 6 11

    4)>> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  48. rian hidayah wiharja
    10.11.4467
    S1 TI 1M

    1. >> A=[1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B=[7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    2. >> A=[1 0 -1]

    A =

    1 0 -1

    >> B=[4;3;2]

    B =

    4
    3
    2

    >> A*B

    ans =

    2

    3. >> A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    5. >> A=[3 0;0 2]

    A =

    3 0
    0 2

    >> B=[1 2 3;4 5 6]

    B =

    1 2 3
    4 5 6

    >> C=[2 0 0;0 3 0;0 0 1]

    C =

    2 0 0
    0 3 0
    0 0 1

    >> A*B

    ans =

    3 6 9
    8 10 12

    >> B*C

    ans =

    2 6 3
    8 15 6

  49. Nama : Ade Gunawan M.Z. Putra
    NIM : 10.11.4520
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  50. Nama : Tiyas Tri Kusumawati
    NIM : 10.11.4483
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  51. Nama : Eko Septianto
    NIM : 10.11.4504
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  52. Nama : Sinta Sulistyaningsih
    NIM : 10.11.4518
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  53. Nama : Yonathan Prasetioso
    NIM : 10.11.4517
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  54. dody dwi sukmanto
    10.11.4475
    S1 TI 1M

    1. >> A=[1 2 3;4 5 6]

    A =

    1 2 3
    4 5 6

    >> B=[7 8 9;0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    2. >> A=[1 0 -1]

    A =

    1 0 -1

    >> B=[4;3;2]

    B =

    4
    3
    2

    >> A*B

    ans =

    2

    3. >> A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    5. >> A=[3 0;0 2]

    A =

    3 0
    0 2

    >> B=[1 2 3;4 5 6]

    B =

    1 2 3
    4 5 6

    >> C=[2 0 0;0 3 0;0 0 1]

    C =

    2 0 0
    0 3 0
    0 0 1

    >> A*B

    ans =

    3 6 9
    8 10 12

    >> B*C

    ans =

    2 6 3
    8 15 6

  55. Nama : Listiyaningsih
    NIM : 10.11.4482
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  56. Nama : Punditya Derry Dwi P
    NIM : 10.11.4485
    Kelas: S1 TI 1M

    1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  57. 1)
    >> A = [1 2 3 ; 4 5 6]

    A =

    1 2 3
    4 5 6

    >> B = [ 7 8 9 ; 0 1 2]

    B =

    7 8 9
    0 1 2

    >> [A+B]

    ans =

    8 10 12
    4 6 8

    >> [A-B]

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> A= [ 1,0,-1]

    A =

    1 0 -1

    >> B = [ 4, 3, 2]

    B =

    4 3 2

    >> A(1)*B(1)+A(2)*B(2)+A(3)*B(3)

    ans =

    2

    3)
    >> A=[1 0; 1 1]

    A =

    1 0
    1 1

    >> B= [2 3 ;4 1]

    B =

    2 3
    4 1

    >> C= [1 1 2; 0 2 3]

    C =

    1 1 2
    0 2 3

    >> [A*B]

    ans =

    2 3
    6 4

    >> [B*A]

    ans =

    5 3
    5 1

    4)
    >> [[ 3 0 ; 0 2]*[1 2 3; 4 5 6]]

    ans =

    3 6 9
    8 10 12

    >> [[1 2 3; 4 5 6]*[2 0 0; 0 3 0; 0 0 1]]

    ans =

    2 6 3
    8 15 6

  58. NAMA : RIZAL WAHYUDIN
    NIM : 10.11.4534

    coding dan hasil eksekusi matriks dengan menggunakan matlab

    (1) >> A=[1 2 3;4 5 6]
    A =
    1 2 3
    4 5 6
    >> B=[7 8 9;0 1 2]
    B =
    7 8 9
    0 1 2
    >> A+B
    ans =
    8 10 12
    4 6 8
    >> A-B
    ans =
    -6 -6 -6
    4 4 4

    (2) >> a=[1 0 -1]
    a =
    1 0 -1
    >> b=[4 ; 3; 2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2

    (3) >> A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1
    >> A*C (IS DEFINED)
    ans =
    1 1 2
    1 3 5
    >> C*A (IS NOT DEFINED)
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    (5 ) >> A=[3 0;0 2]
    A =
    3 0
    0 2
    >> B=[1 2 3;4 5 6]
    B =
    1 2 3
    4 5 6
    >> A*B
    ans =
    3 6 9
    8 10 12
    >> C=[1 2 3;4 5 6]
    C =
    1 2 3
    4 5 6
    >> D=[2 0 0;0 3 0;0 0 1]
    D =
    2 0 0
    0 3 0
    0 0 1
    >> C*D
    ans =
    2 6 3
    8 15 6

  59. NAMA : RIZAL WAHYUDIN
    NIM : 10.11.4534

    coding dan hasil eksekusi matriks dengan menggunakan matlab

    (1) >> A=[1 2 3;4 5 6]
    A =
    1 2 3
    4 5 6
    >> B=[7 8 9;0 1 2]
    B =
    7 8 9
    0 1 2
    >> A+B
    ans =
    8 10 12
    4 6 8
    >> A-B
    ans =
    -6 -6 -6
    4 4 4

    (2) >> a=[1 0 -1]
    a =
    1 0 -1
    >> b=[4 ; 3; 2]
    b =
    4
    3
    2
    >> a*b
    ans =
    2

    (3) >> A=[1 0;1 1]
    A =
    1 0
    1 1
    >> B=[2 3;4 1]
    B =
    2 3
    4 1
    >> C=[1 1 2;0 2 3]
    C =
    1 1 2
    0 2 3
    >> A*B
    ans =
    2 3
    6 4
    >> B*A
    ans =
    5 3
    5 1
    >> A*C (IS DEFINED)
    ans =
    1 1 2
    1 3 5
    >> C*A (IS NOT DEFINED)
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    (5 ) >> A=[3 0;0 2]
    A =
    3 0
    0 2
    >> B=[1 2 3;4 5 6]
    B =
    1 2 3
    4 5 6
    >> A*B
    ans =
    3 6 9
    8 10 12
    >> C=[1 2 3;4 5 6]
    C =
    1 2 3
    4 5 6
    >> D=[2 0 0;0 3 0;0 0 1]
    D =
    2 0 0
    0 3 0
    0 0 1
    >> C*D
    ans =
    2 6 3
    8 15 6

  60. Tugas Aljabar Linier dan Matriks M.Tasykurun 1M 10.11.4503

    Nomor 1:
    >> A=[1 2 3
    4 5 6]

    A =

    1 2 3
    4 5 6

    >> B=[7 8 9
    0 1 2]

    B =

    7 8 9
    0 1 2

    >> A+B

    ans =

    8 10 12
    4 6 8

    >> A-B

    ans =

    -6 -6 -6
    4 4 4

    Nomor 2:
    >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4
    3
    2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    Nomor 3:
    >> A=[1 0
    1 1]

    A =

    1 0
    1 1

    >> B=[2 3
    4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2
    0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> C*A
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    Nomor 5:
    >> A=[3 0
    0 2]

    A =

    3 0
    0 2

    >> B=[1 2 3
    4 5 6]

    B =

    1 2 3
    4 5 6

    >> C=[1 2 3
    4 5 6]

    C =

    1 2 3
    4 5 6

    >> D=[2 0 0
    0 3 0
    0 0 1]

    D =

    2 0 0
    0 3 0
    0 0 1

    >> A*B

    ans =

    3 6 9
    8 10 12

    >> C*D

    ans =

    2 6 3
    8 15 6

  61. doni rusman teja
    10.11.4492
    >>1. a= [1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b= [7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    >>2. a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    >> 3. a= [1 0;1 1]

    a =

    1 0
    1 1

    >> b= [2 3;4 1]

    b =

    2 3
    4 1

    >> c= [1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >>5. a= [3 0;0 2]

    a =

    3 0
    0 2

    >> b= [1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c= [2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  62. nama : rico ardian novriyandhi
    NIM : 10.11.4524

    >>1. a= [1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b= [7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    >>2. a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    >> 3. a= [1 0;1 1]

    a =

    1 0
    1 1

    >> b= [2 3;4 1]

    b =

    2 3
    4 1

    >> c= [1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> mtimes
    Inner matrix dimensions must agree.

    >>5. a= [3 0;0 2]

    a =

    3 0
    0 2

    >> b= [1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c= [2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  63. Menggunakan MATLAB 7.10

    Nama : Pemula Budi Akbar
    NIM : 10.11.4536
    Kelas : S1 TI 1M

    1)
    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2)
    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3)
    >>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13
    4 6 11

    4)
    >> [3 0;0 2]*[1 2 3;4 5 6]

    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    ans =

    2 6 3
    8 15 6

  64. Nama : Septian Dwi C
    NIM : 10.11.4512
    Kelas : S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1. >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2. >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3. >> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    4. >> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

    >>

  65. Nama : Panji Ginanjar Setiawan
    NIM : 10.11.4484
    Kelas : S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1. >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2. >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3. >> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    4. >> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

    >>

  66. Nama : Febrian Budi Utama
    NIM :10.11.4543
    Kelas : S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1. >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2. >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3. >> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    4. >> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

    >>

  67. Nama : Aurelius N Taja
    Nim : 10.11.4473
    Kelas : S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1. >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2. >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3. >> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    4. >> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

    >>

  68. nama : Muhammad Ulinuha n.h
    nim :10.11.4544
    Kelas :S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1.>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.>> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.>> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    5.>> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

    >>

  69. Nama : Muhammad Ibrahim
    NIM : 10.11.4481
    Kelas : S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1.>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.>> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.>> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    5.>> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  70. eko wahyu nugroho
    10.11.4468
    s1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    >> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    >> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    >> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  71. Nama : Beni Viktor
    NIM : 10.11.4480
    Kelas : S1 TI 1M

    To get started, select “MATLAB Help” from the Help menu.

    1.>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.>> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.>> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    5.>> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  72. Nama : Faldi Dwi Hastiya
    NIM : 10.11.4523
    Kelas : S1 Ti 1M
    To get started, select “MATLAB Help” from the Help menu.

    1.>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.>> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.>> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    5.>> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  73. Nama : Dwi Prasetyo Wibowo
    NIM : 10.11.4471
    Kelas : S1 TI 1-M

    To get started, select “MATLAB Help” from the Help menu.

    1.>> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    2.>> a=[1 0 -1]

    a =

    1 0 -1

    >> b=[4;3;2]

    b =

    4
    3
    2

    >> a*b

    ans =

    2

    3.>> a=[1 0;1 1]

    a =

    1 0
    1 1

    >> b=[2 3;4 1]

    b =

    2 3
    4 1

    >> c=[1 1 2;0 2 3]

    c =

    1 1 2
    0 2 3

    >> a*b

    ans =

    2 3
    6 4

    >> b*a

    ans =

    5 3
    5 1

    >> a*c

    ans =

    1 1 2
    1 3 5

    >> c*a
    ??? Error using ==> *
    Inner matrix dimensions must agree.

    5.>> a=[3 0;0 2]

    a =

    3 0
    0 2

    >> b=[1 2 3;4 5 6]

    b =

    1 2 3
    4 5 6

    >> c=[2 0 0;0 3 0;0 0 1]

    c =

    2 0 0
    0 3 0
    0 0 1

    >> a*b

    ans =

    3 6 9
    8 10 12

    >> b*c

    ans =

    2 6 3
    8 15 6

  74. Nama : Muhyiddin Al-Idrus
    NIM : 10.11.4540
    Menggunakan program MATLAB 7.10
    no 1)
    >> a=[1 2 3;4 5 6]

    a =

    1 2 3
    4 5 6

    >> b=[7 8 9;0 1 2]

    b =

    7 8 9
    0 1 2

    jawaban
    >> a+b

    ans =

    8 10 12
    4 6 8

    >> a-b

    ans =

    -6 -6 -6
    4 4 4

    no 2)
    >> a= [1 0 -1]

    a =

    1 0 -1

    >> b= [4;3;2]

    b =

    4
    3
    2

    jawaban
    >> a*b

    ans =

    2

    no 3)
    >>A=[1 0;1 1]

    A =

    1 0
    1 1

    >> B=[2 3;4 1]

    B =

    2 3
    4 1

    >> C=[1 1 2;0 2 3]

    C =

    1 1 2
    0 2 3

    jawaban
    >> A*B

    ans =

    2 3
    6 4

    >> B*A

    ans =

    5 3
    5 1

    >> A*C

    ans =

    1 1 2
    1 3 5

    >> B*C

    ans =

    2 8 13
    4 6 11

    no 4)
    >> [3 0;0 2]*[1 2 3;4 5 6]

    jawaban
    ans =

    3 6 9
    8 10 12

    >> [1 2 3;4 5 6]*[2 0 0;0 3 0;0 0 1]

    jawaban
    ans =

    2 6 3
    8 15 6

    Jika ada kesalhan,mohon konfirmasi ya pak. terima kasih.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s