Since one of the components (SysX{4}) is tiny compared to others but has a signal at a very different field from the rest of the nitroxides, it can be simulated by only using a small portion of the spectra (call that weight x, SysX{4}.rat) and the internal standard. If not done this way, esfit would try to give it a non-zero concentration to help simulate other parts of the spectrum for some scans.
Then, I try to simulate the whole spectrum with other components. The internal standard is allowed to vary (ie the weight of it is now 5y) but I want to keep the weight of the tiny component to have constant ratio to the internal standard (ie xy).
I have written a custom function garlicX:
Code: Select all
function [x,y] = garlicX(SysX,Exp,SimOpt)
%garlicX Component fixed proportion variation
% Generates components on a fixed ratio
% SysX
SysX{4}.weight=SysX{4}.rat*SysX{5}.weight;
[x,y]=garlic(SysX,Exp,SimOpt);
end
However, when I tell esfit to call the following,
Code: Select all
esfit('garlicX',epr_spc+5*transpose(garlic(Sys_dum,Exp)),Sys,VaryX,Exp);
Code: Select all
SysX =
g: 2.0061
Nucs: '14N,1H'
A: [34.6404 32.9124]
lwpp: [0.0384 0.0386]
weight: 5
Cell contents reference from a non-cell array object.
Error in garlicX (line 5)
SysX{4}.weight=SysX{4}.rat*SysX{5}.weight;
1. Is this due to how esfit works such that it made garlicX read only the 1st component in SysX?
2. Is there a better algorithm that can solve this problem?
Thanks!