Hello,
is it possible to simulate a spectrum with multiple components with esfit,
where I need to use different functions for the different components?
For example for the more immobile component chili and for the fast component garlic.
I guess I have to write a user-defined simulation function for this, but I wasn't successful.
Could somebody give me a hint how to write such a function?
Thanks & regards!
Multi-component esfit with different functions possible?
-
- EasySpin Guru
- Posts: 32
- Joined: Wed Jan 20, 2016 11:35 am
Re: Multi-component esfit with different functions possible?
Code: Select all
function y = myfit(Sys,Exp,Opt)
if nargin<3, Opt=struct(); end
Sys_garlic = Sys;
Sys_garlic.g = Sys.g_garlic;
Sys_garlic.logtcorr = Sys.logtcorr_garlic;
Sys_chili = Sys;
Sys_chili.g = Sys.g_chili;
Sys_chili.logtcorr = Sys.logtcorr_chili;
yg = garlic(Sys_garlic,Exp,Opt);
yc = chili(Sys_chili,Exp,Opt);
y = yg +yc;
It is a quick and dirty code, but should do your job.