|
Hi Hugh,
I've tried resetting the options in optimtool from the command line in R2007a (an earlier version - I'm guessing what version your school might be running, you don't mention the exact version). It is possible to change the LargeScale option in the GUI in this way:
* Set LargeScale to 'off' in options
* Call optimtool(options)
* Optimtool will ask you if you want to update the options. Select yes.
* Optimtool will then ask you if you want to reset to the default options for the solver. Select no.
You should see a change in the Algorithm drop down menu (top left, below the Solver drop down), from "Large scale" to "Mediium scale". Note this is in 7a.
Now repeating these steps in the latest version, you will not see any change in the Algorithm option. To change the Algorithm, you should change the 'Algorithm' option in your options structure rather than the LargeScale option.
Hope this helps
Best regards,
Paul
"Hugh " <h_a_patience@hotmail.com> wrote in message <h73iad$9ad$1@fred.mathworks.com>...
> When using optimtool in the older version I call in the options using:
>
> optimtool(options)
>
> When the optimtool GUI appears Solver is set to: fmincon by default.
>
> Withut changing anything else I then reload the options changing 'LargeScale' 'on' to 'LargeScale', 'off' nothing seems to change on the optimtool.
>
> "Hugh " <h_a_patience@hotmail.com> wrote in message <h73eqa$d5j$1@fred.mathworks.com>...
> > Ah that might explain some some of the problerms I'm having. At home I run 2008b.
> >
> > I think the school runs a slightly earlier version though.
> >
> > The code below was generated on a school PC.
> >
> > Is it possible to get advice on both versions?
> >
> > Hugh
> >
> > Hugh
> >
> >
> >
> >
> > Alan Weiss <aweiss@mathworks.com> wrote in message <h73clf$kc3$1@fred.mathworks.com>...
> > > I assume you didn't have the typo when you actually ran lsqcurvefit (you
> > > need another single quote to the right of MaxIter). The order of inputs
> > > does not matter for optimset, you can put in parameters/value pairs in
> > > any order.
> > >
> > > Perhaps your questions would be more easily answered if you examine the
> > > Optimization Tool. Enter
> > > optimtool('lsqcurvefit')
> > > and look carefully at the options, and what changes when you change the
> > > Algorithm (on the upper-left).
> > >
> > > FYI, the options settings for lsqcurvefit changed in R2008b so that
> > > LargeScale is no longer the option used to choose the algorithm. So, if
> > > you want more help, please tell us which version of MATLAB you use.
> > >
> > > Alan Weiss
> > > MATLAB mathematical toolbox documentation
> > >
> > > Hugh wrote:
> > > > Also when I try:
> > > > options=optimset('LargeScale','off','MaxFunEvals',100000,'TolFun',1e-5,'MaxIter;10000)
> > > >
> > > > I get a different answer from this:
> > > >
> > > > options=optimset('LargeScale','off','MaxFunEvals',100000,'TolFun',1e-5,'MaxIter;10000,'LevenbergMarquardt','on')
> > > >
> > > > which also gives the same answer as this:
> > > >
> > > > However : options=optimset('LargeScale','off','MaxFunEvals',100000,'TolFun',1e-5,'MaxIter;10000,'LevenbergMarquardt','off ')
> > > >
> > > > Seems strange adding the 'LevenbergMarquardt' parameter changes the answer, but then it doesn't amke a difference whether it is on or off?
> > > >
> > > > Is curvefit overriding the off instruction?
> > > >
> > > > "Hugh " <h_a_patience@hotmail.com> wrote in message <h72vcn$dc4$1@fred.mathworks.com>...
> > > >> Hi there,
> > > >>
> > > >> I'm still figuing out lsqcurvefit.
> > > >>
> > > >> Each of the possible input options are described in the following link:
> > > >>
> > > >> http://www.mathworks.com/access/helpdesk/help/toolbox/optim/index.html?/access/helpdesk/help/toolbox/optim/ug/lsqcurvefit.html&http://www.mathworks.com/matlabcentral/newsreader/view_thread/254896
> > > >>
> > > >> However I am not clear on how to manipulate these options using optimset. My chief worry is what order should these orders be input in?
> > > >>
> > > >> currently I am just using
> > > >>
> > > >> options=optimset('LargeScale','on','MaxFunEvals',100000,'TolFun',1e-5,'MaxIter;10000)
> > > >>
> > > >> but if I wanted to try solving with a medium scale algo, using Levenberg macquadt how can I change the above to ensure that LM is being used?
> > > >>
> > > >> options=optimset('LargeScale','off','MaxFunEvals',100000,'TolFun',1e-5,'MaxIter;10000)
> > > >>
> > > >> where in the list of parameters so I input Levenberg-Mcquandt? or is the order arbitrary?
> > > >>
> > > >> Also I note when you use LargeScale it is a recommendation rather than a command. How can I know which technique lsqcurvefit used to obtain a given soltion?
|