newtonzao
unknown
matlab
3 years ago
221 B
5
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
endEditor is loading...