Exporting Simulations as X and Y for Primary and Secondary Components

General forum for EasySpin: questions, how to's, etc.
Post Reply
schusch97
Newbie
Posts: 1
Joined: Thu Aug 22, 2024 7:21 am

Exporting Simulations as X and Y for Primary and Secondary Components

Post by schusch97 »

I am trying to export simulated data of primary and secondary components from Easy Spin in an X,Y excel or Ascii format so I can replot the simulated data on GraphPad Prism.

I have tried to lines:
data = [B(:) spc(:)];
save('myfile.txt','data','-ascii');
to my script, but every time it says there is an error in the data = [B(:) spc(:)] line.

I have included an example of the script I use for reference for how I fit the primary Cu component in my samples, where I am loading the DSC files. Is there another way for me to export the data? Or is there a reason it's saying there is an error in the data line of the script?

%Example script

%[x,y,p]=eprload(['user/desktop/140119_PMO-Cu(I)_S_O2_300s_sample6D_30dB_40K']);

X=(x)*(1/10); % convert from gauss to mT

Y=(y-y(1))*1; % zero the first point

%Setting up the experimental parameters
Exp.mwFreq=9.388747; % Xband is 9.5GHz
Exp.Range=[225 375]; % Generates the field range
Exp.nPoints=[1024]; % Number of points simulated
Exp.ModAmp=0.5; %modulation amplitude in mT

%Setting up the computational parameters
Opt.Method='perturb2';
Opt.nKnots = 60;

% Sys sets up the spin system
Sys0.S=1/2; % Cu(II) = S=1/2
Sys0.g=[2.235 2.072 2.042]; % A rhombic g tensor
Sys0.lw=6; % Isotropic broadening
Sys0.Nucs='Cu'; %A copper nuclei
Sys0.A = [500 1 1]; % Copper hyperfine splitting

[XAxis,YAxis]=pepper(Sys0,Exp);

Vary0.A=[20 20 20];
Vary0.g=[0.05 0.05 0.05];
Vary0.lw = [1.0];
%esfit('pepper',Y,Sys0,Vary0,Exp,Opt);

%figure;
plot(X,Y,'k',XAxis,YAxis*2,'r');

xlabel('B (mT)');
ylabel('d\chi"/dB');
set(gca,'YTickLabel','');
xlim([min(X) max(X)])
ylim([min(Y)1.2 max(Y)1.2])

Post Reply