Link tải luận văn miễn phí cho ae Kết nối
[code=php:3edbdn5j]
CODE BÀI TẬP LỚN PHƯƠNG PHÁP TÍNH THẦY LỘC
CÂU 1:
function Cau1
clc;
format short
syms x
mn = input('Nhap 2 so cuoi MSSV: ');
M = (mn+12)/10;
%%%%%%%%%%%%%%
f = exp(x)+2*x^2+sin(x)/M-10;
a = 1;
b = 2;
if double(subs(f,x,a)*subs(diff(diff(f,x),x),x,a))>0
X = a;
else
X = b;
end
if double(subs(diff(f,x),x,a))<double(subs(diff(f,x),x,b));
min = subs(diff(f,x),x,a);
else
min = subs(diff(f,x),x,b);
end
for i = 1:2 %chay nghiem tu x1 -> x2
X = X - subs(f,x,X)/subs(diff(f,x),x,X);
Denta = ceil((abs(subs(f,x,X))*10^4)/min)/10^4;
i = i+1;
end
x2 = double(X), SaiSo = double(Denta),
end
CÂU 2:
function Cau2
clc
format short
syms x
mn = input('Nhap 2 so cuoi MSSV: ');
M = (mn+12)/10;
%%%%%%%%%%%%%%%%%%%%
A=[6+M 2 -3 4 5; 4 7+M 4 -2 -6; 3 -3 8+M -2 -5; 2 -3 4 9+M -3; 5 -3 4 -2 10+M];
B=[9;8;7;6;5];
[L , U]= lu(A);
X= inv(A)*B;
l43 = L(4,3);
u55 = U(5,5);
x5 = X(5,1); [/code:3edbdn5j]
sq10YRziIkc2UbX