Error while exporting data
Posted: Thu Apr 21, 2016 1:01 am
Dear all,
I'm trying to simulate the EPR spectrum for a radical pair using pepper. The error seems to appear while exporting the data in ascii format. The code and the error is as follows.
The error
I kindly request all to help me solve the error.
Thanks and regards,
Abbey
I'm trying to simulate the EPR spectrum for a radical pair using pepper. The error seems to appear while exporting the data in ascii format. The code and the error is as follows.
Code: Select all
clear
%Experimental spectrum
[B,spc] = eprload('PA_exp');
%Spin A:
SysA.S = 1/2;
SysA.g = 2.0099;
SysA.Nucs = '1H,1H,1H,1H,1H';
SysA.weight = 100.85;
SysA.A = mt2mhz([14.5,14.5,14.5,14.5,14.5]/10);
SysA.lwpp = [1.30 0.015];
VaryA.g = [0.05];
VaryA.A = [1];
%Spin B:
SysB.S = 1/2;
SysB.g = 2.0088;
SysB.Nucs = '1H,1H,1H,1H,1H';
SysB.weight = 100.85;
SysB.A = mt2mhz([14.5,14.5,14.5,14.5,14.5]/10);
SysB.lwpp = [1.25 0.015];
VaryB.g = [0.05];
VaryB.A = [1];
%Defining the two spins together:
Sys = {SysA SysB};
Vary = {VaryA VaryB};
%Experimental details:
Exp.mwFreq = 9.137; %Experimental freq
Exp.mwPhase = 3*pi/180;
Exp.Range = [310.569 339.9945]; %data point range
Exp.nPoints = 64293; % number of data points
Exp.ModAmp = 0.15; %in mT
Exp.Temperature = 80; %in Kelvin
Exp.Mode = 'perpendicular';
B = linspace(Exp.Range(1),Exp.Range(2),Exp.nPoints); % field axis
% Next, we specify which parameter we want to be fitted
% and by how much the fitting algorithm can vary it approximately.
% Calling the fitting function
SimOpt.Method = 'perturb2';
FitOpt.Method = 'simplex int'; % simplex algorithm, integrals of spectra
[spc,fitparams] = esfit('pepper',spc,Sys,Vary,Exp);
data = [B(:) spc(:)];
save('myfile.txt','data','-ascii');
Code: Select all
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Error in PAsimc_A (line 46)
data = [B(:) spc(:)];
Thanks and regards,
Abbey