newtonzao

mail@pastecode.io avatar
unknown
matlab
a year ago
221 B
0
Indexable
Never
function newtonStuff(h)
hDouble = str2double(h);
syms x f(x)
f(x) = cos((3*x^2) + 5*x);
z=hDouble;

while z <= 13/10
    disp((f(z+4*hDouble)- 2*f(z) + f(z-4*hDouble))/(16*hDouble^2));
    z=z+hDouble;
end
end