0% found this document useful (0 votes)
25 views

Tutorial Matleb

The document contains code snippets for solving differential equations of varying orders using MATLAB. It also contains code for performing matrix operations like inverse, determinant, rank, transpose, addition, multiplication, and eigenvectors.

Uploaded by

Wahyu Satria
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Tutorial Matleb

The document contains code snippets for solving differential equations of varying orders using MATLAB. It also contains code for performing matrix operations like inverse, determinant, rank, transpose, addition, multiplication, and eigenvectors.

Uploaded by

Wahyu Satria
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Persamaan_Diferensial_Grafik.

m 1 of 1
clc clear all close all % y = dsolve('D2y-Dy -2*y= 4*(t^2)','y(0)=1','Dy(0)= 4') ezplot(y,[ 0 20]) grid on %

Persamaan_Diferensial_Masukan_Eksponensial.m 1 of 1
clc clear all close all % y = dsolve('D2y = 2*Dy + 3*y + 8*exp(3*t)')

Persamaan_Diferensial_Masukan_Polinomial.m 1 of 1
clc clear all close all % y = dsolve('D2y = -Dy + 2*y + 2*t^2 -10*t + 3')

Persamaan_Diferensial_Orde_Sinusoidal.m 1 of 1
clc clear all close all % y = dsolve('D2y = 2*Dy+3*y+cos(2*t)','y(0)=0','Dy(0)=0')

Persamaan_Diferensial_Orde_1.m 1 of 1
clc clear all close all % v = dsolve('Dv = -5*v + 500','v(0)=5')

Persamaan_Diferensial_Orde_2.m 1 of 1
clc clear all close all % y = dsolve('D2y = 6*Dy - 9*y')

Persamaan_Diferensial_Orde_Tinggi.m 1 of 1
clc clear all close all % y = dsolve('D4y = D3y + 20*D2y')

ELIMINIASI_GAUSS.M 1 OF 1 clc clear all close all % Matrik A disp('Matrik A') A = [1 2 -3 3; 2 -1 -1 11; 3 2 1 -5] R = rref(A); % disp(' Nilai x = ') x_1 = R(1,4) x_2 = R(2,4) x_3 = R(3,4) HITUNG_DETERMINAN.M 1 OF 1 clc clear all close all % Matrik A Dimensi 2 x 2 A = [4 -1; 2 1] disp('Nilai Determinan Matrik A : ') D1 = det(A) % Matrik B Dimensi 3 x 3 B = [2 3 -2; 1 4 -2;2 10 -5] disp('Nilai Determinan Matrik B : ') D2 = det(B) HITUNG_INVERS_MATRIK.M 1 OF 1 clc clear all close all % Matrik A Dimensi 2 x 2 A = [3 -2; 4 2] disp('Invers Matrik A : ') D1 = inv(A) % Matrik B Dimensi 3 x 3 B = [4 6 -3; 2 8 -4;2 5 10] disp('Invers Matrik B : ') D2 = inv(B) HITUNG_RANK_MATRIK.M 1 OF 1 clc clear all close all % disp('Matrik A') A = [1 2 3; 2 1 1; 3 2 1]

disp('Matrik B') B = [1 4 1; 1 2 2; 4 2 2] % disp('Hitung Rank Matrik A') A_1 = rank(A) % disp('Hitung Rank Matrik B') B_1 = rank(B) HITUNG_TRANSPOSE_MATRIK.M 1 OF 1 clc clear all close all % Matrik A disp('Matrik A') A = [1 2 3 3; 2 1 1 11; 3 2 1 -5] % disp('Transpose Matrik A') A_Transpose = A' PENJUMLAHAN_MATRIK.M 1 OF 1 clc clear all close all % disp('Matrik A') A = [1 2 3; 2 1 1; 3 2 1] disp('Matrik B') B = [1 4 1; 1 2 2; 4 2 2] % disp('Penjumlahan Matrik') C_1 = A + B % disp('Pengurangan Matrik') C_2 = A B PERKALIAN_MATRIK.M 1 OF 1 clc clear all close all % disp('Matrik A') A = [1 2 3; 2 1 1; 3 2 1] disp('Matrik B') B = [1 4 1; 1 2 2; 4 2 2] % disp('Perkalian Matrik') C=A*B PERKALIAN_MATRIK_SKALAR.M 1 OF 1 clc clear all close all % disp('Matrik A') A = [1 2 3; 2 1 1; 3 2 1]

% disp('Perkalian Matrik Dengan Skalar') C_1 = 2 * A C_2 = (2 * A) 1

VEKTOR_EIGEN.M 1 OF 1 clc clear all close all % Matrik A Dimensi 2 x 2 A= [4 -1; 2 1] [v,d] = eig(A); disp('Nilai Eigen Matrik A : ') d disp('Vektor Eigen Matrik A : ') v % Matrik B Dimensi 3 x 3 B = [2 3 -2; 1 4 -2;2 10 -5] [v1,d1] = eig(B) disp('Nilai Eigen Matrik B : ') d1 disp('Vektor Eigen Matrik B : ') v1

Persamaan_Diferensial_Grafik.m 1 of 1
clc clear all close all % y = dsolve('D2y-Dy -2*y= 4*(t^2)','y(0)=1','Dy(0)= 4') ezplot(y,[ 0 20]) grid on %

Persamaan_Diferensial_Masukan_Eksponensial.m 1 of 1
clc clear all close all % y = dsolve('D2y = 2*Dy + 3*y + 8*exp(3*t)')

Persamaan_Diferensial_Masukan_Polinomial.m 1 of 1
clc clear all close all % y = dsolve('D2y = -Dy + 2*y + 2*t^2 -10*t + 3')

Persamaan_Diferensial_Orde_Sinusoidal.m 1 of 1
clc clear all close all % y = dsolve('D2y = 2*Dy+3*y+cos(2*t)','y(0)=0','Dy(0)=0')

Persamaan_Diferensial_Orde_Tinggi.m 1 of 1
clc clear all close all % y = dsolve('D4y = D3y + 20*D2y')

Persamaan_Diferensial_Orde_2.m 1 of 1
clc clear all close all % y = dsolve('D2y = 6*Dy - 9*y')

Persamaan_Diferensial_Orde_1.m 1 of 1
clc clear all close all % v = dsolve('Dv = -5*v + 500','v(0)=5')

You might also like