Error using esfit "Too many output arguments"

General forum for EasySpin: questions, how to's, etc.
Post Reply
konyenwe@unr.edu
Newbie
Posts: 3
Joined: Wed Nov 15, 2023 11:54 pm

Error using esfit "Too many output arguments"

Post by konyenwe@unr.edu »

Please help.
im trying to export my simulated data,However, I'm running into " Error using esfit
Too many output arguments"

see my code below

clear,clc,clf

[B,spc] = eprload('6_AminoBTR_30_08_23.DTA');
plot(B,spc);

Exp.mwFreq = 9.369752;
Exp.Range = [324.935 344.925]; % mT
Exp.nPoints = 2000; %numel(B)
%Exp.ModAmp = 0.1;
Exp.Temperature = 298;

% Set up spin system with starting parameters
Sys.g = 2.0036;
Sys.S = 1/2;
Sys.Nucs = '14N, 14N, 14N';
Sys.A = [21.5, 14.8, 13.7]; %MHz
Sys.lwpp = [0.35 0.15];

% Set up Vary structure with all parameters that can be varied
Vary.g = 0.002;
Vary.lwpp = [0.02 0.05];
SysVary.A = [5, 5, 5];
Vary.A = [2, 2, 2];

%[B,spc1] = garlic(Sys,Exp);
%plot(B,spc1,'r')
%plot (B,spc/max(spc),'b',B,spc1/max(spc1),'r');

%esfit(spc,@garlic,{Sys,Exp},{Vary})

[fitparams,spc] = esfit(spc,@garlic,{Sys,Exp},{Vary});
npoints = numel(spc);
B = linspace(Exp.Range(1),Exp.Range(2),npoints);
data = [B(:) spc(:)];
save('2.txt','data','-ASCII');

katarkon
Local Expert
Posts: 186
Joined: Mon Jan 12, 2015 4:01 am

Re: Error using esfit "Too many output arguments"

Post by katarkon »

Only one structure fit is returned by esfit().

Post Reply