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

31 lines
414 B
Matlab

x = [0 1 2];
f = 1./(1+x);
t=divdiff(x,f);
x = [0, 1, 2];
f = 1./(1+x);
df = (-1)./((1+x).^2);
[z,t]=divdiff2(x,f,df)
x=linspace(1,2,11);
f=1./(1+x);
df = (-1)./((1+x).^2);
t=divdiff(x,f)
[z,t]=divdiff2(x,f,df)
x = [-2, -1, 0, 1, 2, 3, 4];
f = [-5, 1, 1, 1,7 ,25, 60];
t=divdiff(x,f)
x = [-2, -1, 0, 1, 2, 3, 4];
f = [-5, 1, 1, 1,7 ,25, 60];
t=forwarddiff(f)
t=backdiff(f)