Hi,
I've been trying to simulate two spectra for the same sample at X band and Q band.
I always run into "First input parameter must be a valid function name or function handle."
Does anyone know any easy way to simulate two spectra?
The code I've been trying to run below:
% Simulate mock X/Q-band data
Sys.lw = [0,1.714];
Exp.mwFreq = 9.409308; %experimental data
Exp.Range = [290 370];
yX = pepper(Sys, Exp, SimOpt);
Sys.lw = [0,1.714];
Exp.mwFreq = 34.067051; %experimental data
Exp.Range = [1140 1260];
yQ = pepper(Sys, Exp, SimOpt);
% Perform Fitting
esfit('mysimfun',[yX(:);yQ(:)],Sys,Exp,Vary,SimOpt,FitOpt)
function y = mysimfun (Sys,Exp,SimOpt)
scale = 1;
y = [yX(:); scale*yQ(:)];
end