Anul 3 Semestrul 2

This commit is contained in:
2025-07-03 20:56:38 +03:00
parent 184f3bd92e
commit 3b7fb85767
269 changed files with 20955 additions and 0 deletions
@@ -0,0 +1,14 @@
function Lnf = lagrange_barycentric(nodes,f_nodes,x)
n = length(nodes);
m = length(x);
Lnf = zeros(size(x));
l = zeros(size(nodes));
for i = 1:m
ux = prod( x(i) - nodes([1:n]));
for j = 1:n
wi(j) = 1/prod( nodes(j) - nodes([1:j-1,j+1:n]));
endfor
Lnf(i) = ux* ((wi./(x(i) - nodes([1:n])))*f_nodes');
endfor
end;