function-handle

MatLab recursion error (beginner)

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...

Calling matlab callback/function handle from Java

How do I pass a matlab function handle to a Java object and invoke it from within Java (that is, I want Java to tell matlab when it is ready with a calculation). I am trying to use the com.mathworks.jmi.Matlab class for evaluating Matlab expressions in the Java object, but I can't see how to 1) transfer the callback funcktion handle to J...

MATLAB: calling GUI/GUIDE functions from outside

When I try to invoke a subfunction in a GUI/GUIDE file (using a function handle which has been exposed as a global variable), a new axes is always created even if I set the axes to a specific axes in the GUIDE figure. Does anyone know why this is happening? GUIDE code is: ############################################################### f...

MATLAB- passing a function handle parameter into another function as a handle

Working on an assignment involving Genetic Algorithms (loads of headaches, loads of fun). I need to be able to test differing crossover methods and differing mutation methods, to compare their results (part of the paper I have to write for the course). As such, I want to just pass the function names into the Repopulate method, as functio...