-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function callbacks #106
Comments
You'll need https://github.com/twadleigh/mexjulia for that I believe |
I believe mexjulia let's me go the other way, call Julia with a callback into a matlab function. I'm looking for the opposite. It might work to combine both packages although I haven't tested that. I'm guessing it would open up a new Julia instance in the callback. |
Not sure on your application, but one option is to splice in the value of the julia function if that is all you need. |
Thanks. I'm not sure what you mean by splice in the value of the function. The latter doesn't work for my application. The goal is to use fmincon and have it call a julia function. I realize there are optimizers in Julia, and I've wrapped another commercial optimizer as well, but I'd like to be able to use fmincon on Julia functions as another option and for benchmarking purposes. I was able to write a Python wrapper than enabled me to call fmincon from Python with callbacks into a Python function. I was hoping to do something similar with Julia. |
unfortunately that's not currently possible using MATLAB.jl . I'm not sure if it would be possible to implement something like that using mexjulia and then getting back the results into julia cc @twadleigh , but it would be a nice feature. |
Hmm this may actually be possible to implement, although perhaps not super straightforward. |
Just implemented this for fmincon with a combination of MATLAB.jl and mexjulia. See https://github.com/byuflowlab/Fmincon.jl. I had to revive mexjulia (update to Julia 1.0) to get it to work, (which I reformatted as a Julia package). The updated mexjulia is at https://github.com/byuflowlab/Mex.jl |
Is it possible to pass in a Julia function and have matlab call it. Like calling matlab's fzero for example. I don't need fzero, it's just a simple example. I couldn't find a way to do it, but thought I'd ask.
The text was updated successfully, but these errors were encountered: