Thank you very much!

-----Original Message-----

From: [gmx.de] Markus Mützel <

[hidden email]>

Sent: Wednesday, April 15, 2020 9:02 AM

To: Bikbov, Ruslan [ICG-RSCH]

Cc: Nicholas Jankowski;

[hidden email]
Subject: Re: fminsearch question

Am 15. April 2020 um 14:52 Uhr schrieb "Bikbov, Ruslan via Help-octave":

> Thank you. What I mean is I have a function that depends on a parameter. Say my function is f(x,a) where “x” is the variable I optimize and “a” is a parameter. How can I pass parameter “a” to fminsearch in Octave?

You could use anonymous functions for that use case:

x_opt = fminsearch(@(x) f(x,a), x0, ...)

HTH,

Markus