How can I convert old syntax search methods to new syntax for the Genetic Algorithm and Direct Search Toolbox?

1 view (last 30 days)
I have a search function written before version 2.0.2 of Genetic Algorithm and Direct Search Toolbox. The old syntax I have currently follows the form:
function [successSearch,nextIterate,optimState] =
searchfcntemplate(fun,iterate,tol,A,L,U, ...
funeval,maxfun,searchoptions,objfcnarg, ...
iterlimit,factors)
How can I convert this syntax so that it will work in later versions?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
In Genetic Algorithm and Direct Search Toolbox version 2.0.2, a new syntax for search method is introduced. The new syntax is more efficient both with speed and memory, and has the following form:
function [successSearch,xBest,fBest,funccount] =
searchfcntemplate(fun,x,A,b,Aeq,beq,lb,ub, ...
optimValues,options)
If you have a search function written for use in a previous release, the function performs correctly in Version 2.0.2 but returns a warning. Custom search functions written in a previous version need to be updated with the new syntax. In later versions, this syntax may cause a warning or error.
A utility function is provided to convert your search functions from previous releases to the new syntax of Version 2.0.2. Download the attached MATLAB file named "searchConversion".

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!