newtonzao

 avatar
unknown
matlab
2 years ago
221 B
1
Indexable
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
Editor is loading...