tutorial matlab

Click here to load reader

Post on 26-Dec-2015

178 views

Category:

Documents

7 download

Embed Size (px)

DESCRIPTION

Tutorial For Using Matlab In Indonesian Language by Erie Eric.

TRANSCRIPT

  • TUTORIAL

    MATLAB

    Dr. ARIE ERIC RAWUNG, MT

    STTAR / VEDC MALANG

    2014

  • DAFTAR ISI

    KEGIATAN BELAJAR 1 .................................................................................................. 6

    KEGIATAN 1 ..................................................................................................................... 8

    1.1 Pengertian Matlab ................................................................................................ 8

    1.2 Memulai MATLAB ................................................................................................ 9

    1.3 Sintaks Dasar Matlab ......................................................................................... 10

    1.3.1 Operator dan Karakter Khusus .................................................................... 12

    1.3.2 Variabel dan Konstanta Khusus ................................................................... 14

    1.4 Variabel-variabel Matlab ................................................................................... 14

    1.4.1 Penulisan Statemen Banyak ........................................................................ 16

    1.4.2 Penulisan Statemen Panjang ....................................................................... 16

    1.4.3 Perintah Format .............................................................................................. 17

    1.4.4 Membuat Vektor ............................................................................................. 18

    1.4.5 Membuat Matriks ............................................................................................ 19

    1.5 Perintah-perintah Matlab ................................................................................... 20

    1.5.1 Perintah untuk mengatur sebuah sesi ........................................................ 20

    1.5.2 Perintah-perintah Input Output ..................................................................... 20

    1.5.3 Perintah Vektor, Matriks dan Array .............................................................. 22

    1.5.4 Perintah Menggambar ................................................................................... 23

    Rangkuman 1 .................................................................................................................. 24

    Latihan 1 .......................................................................................................................... 24

    Tugas 1 ............................................................................................................................ 24

    Kunci Jawaban 1 ............................................................................................................ 24

    Daftar Pustaka 1 ............................................................................................................. 24

    KEGIATAN 2 ................................................................................................................... 25

    1.6 Berkas .m (M Files) ............................................................................................ 25

    1.6.1 Mengunakan Prompt Perintah...................................................................... 25

    1.6.2 Membuat dan Menjalankan File Script Mengunakan IDE ........................ 26

    1.7 Vektor ................................................................................................................... 28

    1.7.1 Vektor Baris: .................................................................................................... 28

    1.7.2 Vektor Kolom: ................................................................................................. 28

  • 1.7.3 Referensi Element dari sebuah Vektor ....................................................... 29

    1.8 Matriks .................................................................................................................. 30

    1.8.1 Referensi Element-elemen Matriks ............................................................. 30

    1.8.2 Menghapus sebuah Baris atau Kolom dalam ............................................ 32

    1.9 Array ..................................................................................................................... 33

    1.9.1 Arrays Khusus dalam MATLAB .................................................................... 33

    1.9.2 Arrays Multi Dimensi ...................................................................................... 35

    Rangkuman 2 .................................................................................................................. 38

    Latihan 2 .......................................................................................................................... 38

    Tugas 2 ............................................................................................................................ 38

    Kunci Jawaban 2 ............................................................................................................ 38

    Daftar Pustaka 2 ............................................................................................................. 38

    KEGIATAN 3 ................................................................................................................... 39

    1.10 Tipe Data dalam MATLAB ................................................................................ 39

    1.10.1 Konversi Tipe Data ......................................................................................... 41

    1.10.2 Penentuan Tipe Data ..................................................................................... 42

    1.11 Operator MATLAB .............................................................................................. 46

    1.11.1 Operator Arithmetik ........................................................................................ 46

    1.11.2 Operator Relasi ............................................................................................... 49

    1.11.3 Operator Logika .............................................................................................. 50

    1.11.4 Operasi Bitwise ............................................................................................... 51

    1.11.5 Operasi Set ..................................................................................................... 53

    Rangkuman 3 .................................................................................................................. 55

    Latihan 3 .......................................................................................................................... 55

    Tugas 3 ............................................................................................................................ 55

    Kunci Jawaban 3 ............................................................................................................ 55

    Daftar Pustaka 3 ............................................................................................................. 55

    KEGIATAN 4 ................................................................................................................... 56

    1.12 Pembuatan Keputusan MATLAB ..................................................................... 56

    1.12.1 Pembuatan Keputusan if ... end ................................................................... 58

    1.12.2 Pembuatan Keputusan if ... else end .......................................................... 59

  • 1.12.3 Pembuatan Keputusan if ... elseif else end ........................................... 61

    1.12.4 Pembuatan Keputusan If else end Bercabang ..................................... 63

    1.13 Tipe Pengulangan MATLAB ............................................................................. 64

    1.13.1 Pengulangan while end ............................................................................ 65

    1.13.2 Pengulangan forend ................................................................................... 66

    1.13.3 Pengulangan forend Bercabang .............................................................. 67

    Rangkuman 4 .................................................................................................................. 69

    Latihan 4 .......................................................................................................................... 69

    Tugas 4 ............................................................................................................................ 69

    Kunci Jawaban 4 ............................................................................................................ 69

    Daftar Pustaka 4 ............................................................................................................. 69

    KEGIATAN 5 ................................................................................................................... 70

    1.14 Persamaan Aljabar Dasar MATLAB ................................................................ 70

    1.14.1 Pemecahan Persamaan Aljabar Dasar Octave ......................................... 72

    1.14.2 Pemencahan Persamaan Kuadrat MATLAB ............................................. 73

    1.14.3 Pemecahan Persamaan Kuadrat Octave ................................................... 74

    1.14.4 Pemecahan Persamaan Orde Tinggi MATLAB ......................................... 74

    1.14.5 Pemecahan Persamaan Orde Tinggi Octave ............................................ 76

    1.14.6 Pemecah