I always met a problem using easyspin 6, but it did work viz easyspin 5.2.3. And easyspin 5.2.3 has expired.
" You provided 7 inputs, but esfit requires 4, 5, or 6.
Examples:
esfit(data, fcn, p0, pvary)
esfit(data, fcn, p0, pvary, Opt)
esfit(data, fcn, p0, lb, ub)
esfit(data, fcn, p0, lb, ub, Opt)"
"esfit('pepper',spc,Sys,Vary,Exp,SimOpt,FitOpt);"
Here is my input:
"[B,spc] = textread('XXX.txt','%f %f');
% clearvars -except spc B;
Exp.mwFreq = 9.6; %experimental data
Exp.Range = [300 380];
Exp.ModAmp = 0.5;
Exp.Temperature = 295;
Sys.S = 0.5;
Sys.g = [ 2 ];
Sys.lw = [0 1.5]; %in mT
Sys.Nucs = '14N, 14N, 31P';
Sys.A = [65;30;42];
Sys.AFrame = [-30 0 0;30 0 0;30 0 0]/180*pi ;
Vary.g = [0.01];
Vary.lw = [0.0 0.3];
Vary.A = [10;10;10];
Vary.AFrame = [10 0 0;10 0 0;10 0 0]/180*pi;
SimOpt.nKnots = 31;
SimOpt.Method = 'perturb';
FitOpt.Method = 'simplex fcn';
FitOpt.Scaling = 'lsq0';
% SimOpt/FitOpt_parameters
% SimOpt.Verbosity = [];
% FitOpt.PopulationSize = 500;
% FitOpt.maxGenerations = 100;
% FitOpt.nParticles = 100;
esfit('pepper',spc,Sys,Vary,Exp,SimOpt,FitOpt);"