Ok. So i've got two function in MatLab that are calling each other.
Riemann.m
function I = Riemann(f, dx, a, b)
x = a:dx:b;
fx = f(x).*dx;
I = sum(fx);
and myfunc.m
function f = myfunc(x)
f = sin(1./x);
for n=1:100
I = Riemann(@myfunc, 0.001, 1/n, 1);
end
plot(I)
The problem is getting that to run. How do I call myfunc to get anything out of that. Everything I've tried ends up in an endless recursive call stack (which makes sense).