Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added DA_THPPT_5.pdf
Binary file not shown.
Binary file modified FINAL/DoAnMatlab.mlapp
Binary file not shown.
2 changes: 1 addition & 1 deletion FINAL/DoAnTimNghiem/chiadoi.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
else
b = c;
end
n = n + 1;
n = n;
end
end
20 changes: 10 additions & 10 deletions FINAL/DoAnTimNghiem/tieptuyen.m
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
function [x3, n3] = tieptuyen(fx, a, b ,saiso)
n3 = 0;
x3 = (a+b)/2;
syms x
df = matlabFunction(diff(fx(x)));
while abs((x3-fx(x3)/df(x3))-x3) > saiso
x3 = x3 - fx(x3)/df(x3);
n3 = n3 + 1 ;
end
end
function [x1, n] = tieptuyen(fx, a, b, saiso)
syms x;
df = matlabFunction(diff(fx(x))); % dao ham fx
x1 = (a + b)/2;
n = 0;
while abs(fx(x1)) > saiso
x1 = x1 - fx(x1)/df(x1); % newton
n = n + 1;
end
end