Code: Select all
y=simfunction(Sys{1},Exp,Opt)+simfunction(Sys{2},Exp,Opt)+simfunction(Sys{3},Exp,Opt)+...
Code: Select all
y=simfunction({Sys1,Sys2,...},Exp,Opt)
Code: Select all
y=simfunction(Sys{1},Exp,Opt)+simfunction(Sys{2},Exp,Opt)+simfunction(Sys{3},Exp,Opt)+...
Code: Select all
y=simfunction({Sys1,Sys2,...},Exp,Opt)
Code: Select all
function y = mysim(Sys,Exp,Opt);
if isfield(Sys,'mwFreq'),Exp.mwFreq = Sys.mwFreq; end
y = garlic(Sys,Exp,Opt);
Code: Select all
Sys.mwFreq = 9.65;
Sys.g=2;
Vary.mwFreq = 0.05;
Exp.Range =[...];
esfit('mysim',data,Sys,Vary,Exp);
Code: Select all
Sys1.mwFreq = 9.65;
Sys1.g=2;
Vary1.mwFreq = 0.05;
Sys2.mwFreq = 9.65;
Sys2.g=2.05;
Vary2.mwFreq = 0.05;
Exp.Range =[...];
esfit('mysim',data,{Sys1,Sys2},{Vary1,Vary2},Exp);
Code: Select all
function y = mysim(Sys,Exp,Opt);
Sys1=Sys{1};
Sys2=Sys{2};
if isfield(Sys1,'mwFreq'),Exp.mwFreq = Sys1.mwFreq; end
y = garlic(Sys1,Exp,Opt)+garlic(Sys2,Exp,Opt);