From: SACHIN DEVASSY on
Hi

I wanted to know how to obtain same answer each time we run program of pattern search which has options of Search method "GPSPositiveBasis2n" and poll method of MADSPostiveBasis2N.

Thanks
From: Steven Lord on

"SACHIN DEVASSY" <sachindevassy(a)gmail.com> wrote in message
news:hpkbtu$reh$1(a)fred.mathworks.com...
> Hi
>
> I wanted to know how to obtain same answer each time we run program of
> pattern search which has options of Search method "GPSPositiveBasis2n" and
> poll method of MADSPostiveBasis2N.

A necessary condition for this (it may not be sufficient, I haven't checked)
is to reset the random number generator before each time you run your
patternsearch program. If you're using a version of MATLAB that uses
RandStream objects for random number generation (release R2008b or later)
then this is the syntax to use:

reset(RandStream.getDefaultStream);

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ