[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fminsearch question
From: |
Markus Mützel |
Subject: |
Re: fminsearch question |
Date: |
Wed, 15 Apr 2020 15:01:32 +0200 |
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