Files
School/Anul 3/Semestrul 2/Calcul numeric/forwarddiff.m
T
2025-07-03 20:56:38 +03:00

12 lines
168 B
Matlab

function t = forwarddiff(f)
n = length(f);
t = zeros(n);
t(:,1)= f'
for j = 2:n
t(1:n-j+1,j) = diff(t(1:n-j+2,j-1));
endfor
end;