Path: news.mathworks.com!not-for-mail
From: Alan_Weiss <aweiss@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: optimoptions
Date: Mon, 25 Mar 2013 10:27:38 -0400
Organization: MathWorks
Lines: 42
Message-ID: <kipmsq$7d6$1@newscl01ah.mathworks.com>
References: <kikv5d$tb$1@newscl01ah.mathworks.com> <kiphhc$iie$1@newscl01ah.mathworks.com>
Reply-To: aweiss@mathworks.com
NNTP-Posting-Host: ah-aweiss.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: newscl01ah.mathworks.com 1364221658 7590 172.28.17.56 (25 Mar 2013 14:27:38 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Mar 2013 14:27:38 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
In-Reply-To: <kiphhc$iie$1@newscl01ah.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:791960

On 3/25/2013 8:56 AM, Alan_Weiss wrote:
> On 3/23/2013 3:18 PM, Nikola wrote:
>> Hi all,
>>
>> I am trying to set options for a hybrid function within a genetic 
>> algorithm. The online documentation recommends the following:
>>
>> hybridopts = 
>> optimoptions('fminunc','Display','iter','Algorithm','quasi-newton');
>> options = gaoptimset(options,'HybridFcn',{@fminunc,hybridopts});
>> However, I am getting the following error:
>>
>> ??? Undefined function or method 'optimoptions' for input arguments 
>> of type 'char'.
>>
>> I tried this Matlab 2010b and 2011a and it did not work. I also tried 
>> @fminunc instead of 'fminunc', but it didn't work either.
>>
>> I'd greatly appreciate any feedback.
>>
>> Nikola
> optimoptions is new for R2013a. To see older doc on the topic:
> http://www.mathworks.com/help/releases/R2012b/gads/genetic-algorithm-options.html#f17822 
>
>
> Basically, you just use
> hybridopts = optimset('Display','iter','Algorithm','quasi-newton');
> in place of the optimoptions call.
>
> Alan Weiss
> MATLAB mathematical toolbox documentation

Oh, one other thing. The fminunc Algorithm option is also new for 
R2013a. You want the following:

hybridopts = optimset('Display','iter','LargeScale','off');

See the release notes:
http://www.mathworks.com/help/optim/release-notes.html

Alan Weiss
MATLAB mathematical toolbox documentation