Page 1 of 1

Simple(?) Fitting Question

Posted: Tue Apr 12, 2022 12:22 pm
by TryingToFit

Hello, I'm trying to fit some SQUID data, but I'm getting an error that says "Matrix dimensions must agree" and "Error while evaluating UIControl Callback"

I'm still learning about EasySpin and Matlab so any help would be appreciated, the code is listed below. Thanks!

%%

clear,clc

Sys.S = [3/2 1 3/2];
Sys.g = [2 2 2];

J = [25 -75 25]; % cm^-1, H = -2JS1S2
J = J100clight/1e6; % cm^-1 to MHz
Sys.J = -2*J;

B = 1000; % mT
T = 2:300;

Exp.Field = B;
Exp.Temperature = T;

FitOpt.Scaling = 'none';

Opt.Units = 'cgs';
curry(Sys,Exp,Opt);

FitOpt.OutArg = [2 2]; % to fit mag moment chizz (second output)

Vary.g = [0.3 0.2 0.3];
Vary.J = [20 20 20];

[ChiTData,spc] = textread('6_99_squidDATA.txt','%f %f');

esfit(@curry,spc,Sys,Vary,Exp,Opt,FitOpt);


Re: Simple(?) Fitting Question

Posted: Thu Jun 09, 2022 3:07 am
by Stefan Stoll

Unclear what the problem is. Please post the full error printed by Matlab, and please post your data file, so we can try to reproduce it.