matlab - Fortran minimization of a function with additional arguments -


In the Fortune I have an external customization routine that takes input as function f (x) And gives the starting point and value for the local minimum, for example if the function is called minimal:

  minimum (f, x0, xopt)   < P> The problem is that I need at least the function some additional logic that is not part of the least routine:  f (x, data) .  

How can I remove this issue? In the mailback I will use anonymous function

  g = @ (x) f (x, data) min (g, X0, xopt)   

Although I understand in Foreign 9, there is no unknown function.

Thank you.

You do not need anonymous tasks for this. Your Matlab example is not anonymously at the end, it has a name g .

There are great uses of Fortran's internal functions (Fortran 2008 feature, but supported in gaurtran and earport, not supported in Solaris studio):

  call min (live , X0, xopt), real function g (x) real, int (in) :: xg = f (x, data) end function end    

Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

java - Session timeout does't work vaadin -