Page 1 of 1

Random start on esfit with command line

Posted: Mon Jun 18, 2018 1:41 am
by Hironobu Tahara
Hi, I have a problem of Random Start on esfit without GUI.
I used EasySpin 5.2.16 on MATLAB 2016a on Widows 10 x64.
As described in the manual, FitOpt.RandomStart = 0 should mean the fitting starts with a center value.
But esfit does not accept FitOpt.RandomStart = 0, it always starts with random values.
If I did not set FitOpt.RandomStart field, esfit started with a center value.
If the field RandomStart in FitOpt structure, esfit starts with random values independent on the value of FitOpt.RandomStart.

For example, the following settings always gives me a random start in the esfit calculation.

Code: Select all

SimOpt = [];
FitOpt.Method = 'levmar fcn';
FitOpt.Scaling = 'lsq0';
FitOpt.RandomStart = 0;
FitOpt.PrintLevel = 1;
FitOpt.TolFun = 1e-6;
FitOpt.lambda = 1e-3;
FitOpt.delta = 1e-6;
BestSys = esfit('chili',Spc_exp,Sys,Vary,Exp,SimOpt,FitOpt);
Is that a bug?

Re: Random start on esfit with command line

Posted: Mon Jun 18, 2018 4:53 pm
by Stefan Stoll
Yes, this is a bug - thanks for reporting! This will be fixed in the next patch release.

Re: Random start on esfit with command line

Posted: Mon Jun 18, 2018 9:21 pm
by Stefan Stoll
This is fixed in 5.2.17

Re: Random start on esfit with command line

Posted: Mon Jun 18, 2018 11:54 pm
by Hironobu Tahara
The 5.2.17 is working as I have expected!
Thank you for your fixing!