Tugas Sistem Persamaan Linear

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

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)

Sistem persamaan tak linear


p=[1 -10 -50 24];
x=roots(p)

p=[1 -9 26 -24];
x=roots(p)

p=[1 -20 155 -580 1044 -720];


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 -10 -50 24];


x=roots(p)

p=[1 -9 26 -24];
x=roots(p)

p=[1 -20 155 -580 1044 -720];


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 = [3.2 3.3 3.350 3.40 3.5 3.6 3.65 3.70];


p = [0.3125 0.3030 0.2985 0.2941 0.2857 0.2777 0.2739 0.2702];
x = 3:0.001:4
y = spline(t,p,x)
plot(t,p,'o',x,y)

t = [220 240 260 280]


p = [1153.4 1160.6 1167.4 1173.8]
pi=interp1(t,p,252)
ps=spline(t,p,252)
x = 220:1:280
y = interp1(t,p,x) %
plot(t,p,'o',x,y,252,pi, 'x')

t = [0 0.019 0.0721 00.0966 0.1238 0.1661 0.2337 0.2608];


p = [0 0.17 0.3891 0.4375 0.4704 0.5089 0.5445 0.5580];
pi=interp1(t,p,0.05)
ps=spline(t,p,0.05)
x = 0:0.1:0.2608
y = interp1(t,p,x) %
plot(t,p,'o',x,y,0.05,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')

Tugas 04 system toolbox


syms x
f = 2*(x^3)-4*(x^2)+ 5*x-17
diff(f)
syms x
f= exp(x)*cos(x)
diff(f)
syms x
f= 1/(3-x^2)
diff(f)
syms x
f = 2*(x^3)-4*(x^2)-5*x-17
f= exp(x)*cos(x)
f= 1/(3-x^2)
diff(f,2)
diff(diff(f))
syms x t
f = 2*(x^3)-4*(x^2)+5*x*(t^2)-17*t
f=exp(x*t)*cos(x)
f=1/(3*t-x^2)
diff(f,x)
diff(f,t)
syms h n x
limit((1+(x+n/n)^n) - (1+(x/n)^n)/n),n,~)

You might also like