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 08:56:12 -0400
Organization: MathWorks
Lines: 29
Message-ID: <kiphhc$iie$1@newscl01ah.mathworks.com>
References: <kikv5d$tb$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 1364216172 19022 172.28.17.56 (25 Mar 2013 12:56:12 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 25 Mar 2013 12:56:12 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4
In-Reply-To: <kikv5d$tb$1@newscl01ah.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:791949

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