Error in fitting Cu data

General forum for EasySpin: questions, how to's, etc.
Post Reply
shepworth497
Newbie
Posts: 1
Joined: Fri Jun 30, 2023 2:52 am

Error in fitting Cu data

Post by shepworth497 »

I get the following error in MATLAB when trying to simulate a Copper LT spectrum at X-band:
Error using zeros
Size inputs must be integers.

Error in isotopologues

Error in isotopologues

Error in pepper

Error in esfit

Error in esfit_simplex

Error in esfit

Error while evaluating UIControl Callback.

This is my script:

clear;
clc;
[x,y0] = eprload;
y = cwzero(y0);

Sys.g = [2.0023 2.0023 2.3082];
Sys.Nucs = 'Cu';
Sys.n = 1.5;
Sys.A = [16 16 404]; %MHz
Sys.lwpp = 0.7791; %MHz
Sys.weight = 1;

Sys1.g = [2.0023 2.0023 2.3321];
Sys1.Nucs = 'Cu';
Sys1.n = 1.5;
Sys1.A = [15 15 378]; %MHz
Sys1.lwpp = 0.895; %MHz
Sys1.weight = 0.5;

Vary.g = [0.0005 0.0005 0.0005];
Vary.A = [5 5 3];
Vary.lwpp = 0.1;

Vary1.g = [0.001 0.001 0.0005];
Vary1.A = [10 10 8];
Vary1.lwpp = 0.1;
Vary1.weight = 0.2;

Exp.mwFreq = 9.438498; %GHz
Exp.CenterSweep = [305 150]; %mT
Exp.nPoints = 2048;

FitOpt.Method = 'simplex';
FitOpt.RandomStart = 0;
FitOpt.Scaling = 'minmax';

esfit(@pepper,y,{Sys,Sys1},{Vary,Vary1},Exp,[],FitOpt);

Do you know how to fix this please? Thanks

thanasis
Local Expert
Posts: 242
Joined: Thu Jan 21, 2016 6:28 am
Location: Strasbourg

Re: Error in fitting Cu data

Post by thanasis »

Size inputs must be integers.

The error comes from inclusion of Sys.n.
First: This is for garlic.
Second: It must be an integer.

Post Reply