I am editing some legacy code in which fminsearch is implemented as,
[x, fval] = fminsearch('myfun', x, options, arg1, arg2, arg3) ;
where 'myfun' is the name of a saved function myfun.m that takes input
arguments x, arg1, arg2, and arg3, each of which are vectors (though
most with just one element). myfun.m returns the value fval. In the
input list to to fminsearch, x is the initial guess to start the
minimization of fval with respect to x.
The fminsearch documentation does not mention that the input arguments
to myfun can be listed after the optimization options. Is it valid?
The code does work. Is there a limit to how many input arguments
could be passed in?
|
|
0
|
|
|
|
Reply
|
ke
|
5/12/2010 4:18:31 PM |
|
ke <kateedwards11@hotmail.com> wrote in message <d799ad45-d7ef-42b6-b8d9-c92df98ae52a@e2g2000yqn.googlegroups.com>...
> The fminsearch documentation does not mention that the input arguments
> to myfun can be listed after the optimization options. Is it valid?
> The code does work. Is there a limit to how many input arguments
> could be passed in?
It's an older style now depreated, but still enabled for backward compatibility's sake.
|
|
0
|
|
|
|
Reply
|
Matt
|
5/12/2010 4:26:08 PM
|
|
On 5/12/2010 12:26 PM, Matt J wrote:
> ke <kateedwards11@hotmail.com> wrote in message
> <d799ad45-d7ef-42b6-b8d9-c92df98ae52a@e2g2000yqn.googlegroups.com>...
>
>> The fminsearch documentation does not mention that the input arguments
>> to myfun can be listed after the optimization options. Is it valid?
>> The code does work. Is there a limit to how many input arguments
>> could be passed in?
>
> It's an older style now depreated, but still enabled for backward
> compatibility's sake.
To see the recommended way of passing extra parameters, see
http://www.mathworks.com/access/helpdesk/help/toolbox/optim/ug/brhkghv-7.html
Alan Weiss
MATLAB mathematical toolbox documentation
|
|
0
|
|
|
|
Reply
|
Alan
|
5/12/2010 6:55:34 PM
|
|
On May 12, 2:55=A0pm, Alan Weiss <awe...@mathworks.com> wrote:
> On 5/12/2010 12:26 PM, Matt J wrote:> ke <kateedward...@hotmail.com> wrot=
e in message
> > <d799ad45-d7ef-42b6-b8d9-c92df98ae...@e2g2000yqn.googlegroups.com>...
>
> >> The fminsearch documentation does not mention that the input arguments
> >> to myfun can be listed after the optimization options. Is it valid?
> >> The code does work. Is there a limit to how many input arguments
> >> could be passed in?
>
> > It's an older style now depreated, but still enabled for backward
> > compatibility's sake.
>
> To see the recommended way of passing extra parameters, seehttp://www.mat=
hworks.com/access/helpdesk/help/toolbox/optim/ug/brhkgh...
>
> Alan Weiss
> MATLAB mathematical toolbox documentation
Thanks to both of you! Mystery solved.
|
|
0
|
|
|
|
Reply
|
ke
|
5/12/2010 7:11:57 PM
|
|
|
3 Replies
591 Views
(page loaded in 0.663 seconds)
Similiar Articles: fminsearch and multiple inputs to function - comp.soft-sys.matlab ...I am editing some legacy code in which fminsearch is implemented as, [x, fval] = fminsearch('myfun', x, options, arg1, arg2, arg3) ; where 'myfun' i... How can i take my system time in milliseconds in matlab - comp ...fminsearch and multiple inputs to function - comp.soft-sys.matlab ... How can i take my system time in milliseconds in matlab - comp ..... time ... which requires you to ... Using matlab to do modelling and curve fitting using Data from ...I tried searching for the functions to use and sort of came across the function "fminsearch ... using Proc ... ... comp.soft-sys.matlab Sine Curve Fit to Data ... multiple ... difference between objective and fitness function(s)? - comp.ai ...Such as, the actual input into the GA ... (ii) What defines your fitness function? (iii) Are you doing single or multiple ... estimation parameter using fminsearch - comp ... fminsearch and multiple inputs to function - comp.soft-sys.matlab ...I am editing some legacy code in which fminsearch is implemented as, [x, fval] = fminsearch('myfun', x, options, arg1, arg2, arg3) ; where 'myfun' i... fminsearch - Find minimum of unconstrained multivariable function ...fun is the function to be minimized. It accepts an input x and returns a scalar f, the ... can be specified as a function handle for a function file. x = fminsearch ... 7/21/2012 9:17:03 PM
|