Professional Documents
Culture Documents
Tugas Sistem Persamaan Linear
Tugas Sistem Persamaan Linear
Tugas Sistem Persamaan Linear
3 x1 2 x2 x3 3
2 x1 4 x2 2 x3 2
4 x1 2 x2 3 x3 12
A= [3 -2 1; 2 4 -2; 4 -2 -3]
b= [3; 2; -12]
x=A\b
det (A)
3x1 x2 3 x3 2
5 x1 3x2 x3 6
x1 2 x2 x3 2
A= [3 -1 3; 5 3 1; 1 2 -1]
b= [2; 6; 2]
x=A\b
det (A)
2 x2 x3 3
2 x1 3 x2 x3 1
3 x1 2 x2 5 x3 10
A= [0 2 -1; 2 -3 1; 3 -2 5]
b= [3; 1; 10]
x=A\b
det (A)
2 x1 2 x2 x3 1
x1 x2 3 x3 3
3 x1 2 x2 x3 1
A= [2 -2 1; 1 1 -3; 3 -2 -1]
b= [1; 3; 1]
x=A\b
det (A)
p=[1 -9 26 -24];
x=roots(p)
f=@(x) 5/3*cos(40)-5/2*cos(x)+11/6-cos(40-x);
x0=3;
x=fzero(f,x0)
f=@(x) x-cos(x);
x0=3;
x=fzero(f,x0)
f=@(x) exp(x)-2*x-2;
x0=3;
x=fzero(f,x0)
p=[1 -9 26 -24];
x=roots(p)
f=@(x) 5/3*cos(40)-5/2*cos(x)+11/6-cos(40-x);
x0=3;
x=fzero(f,x0)
f=@(x) x-cos(x);
x0=3;
x=fzero(f,x0)
f=@(x) exp(x)-2*x-2;
x0=3;
x=fzero(f,x0)
Tugas Interpolasi
clear;clc
t = [3.35;3.40;3.50;3.60];
p = [0.298507; 0.294118; 0.285714; 0.277778];
pi=interp1(t,p,3.44)
ps=spline(t,p,3.44)
x = 3.35:0.001:3.60;
y = interp1(t,p,x);
plot(t,p,'o',x,y,3.44,pi, 'x')
t = [280:10:330];
p = [1.563 2.905 5.181 8.901 14.780 23.810];
pi=interp1(t,p,316)
ps=spline(t,p,316)
x = 280:10:0.330
y = interp1(t,p,x)
plot(t,p,'o',x,y,316,pi, 'x')