I try to perform esfit with my own simulation function.
When fitting is started, the current simulation is not shown and rmsd is constant.
When stopped and saved, the simulation is plotted.
Here is my code:
Code: Select all
clear; close;
[B,spc]=eprload('Coli_2.DSC');
load('coli2.mat'); %load Sys Exp
Sys.Aperp=Sys.A(2);
Sys.Apar=Sys.A(1);
Sys=rmfield(Sys,'A');
Vary.Aperp = 15;
%Vary.A = [0 100;0 100];
Vary.Apar =90;
esfit('mysim',spc,Sys,Vary,Exp)
Code: Select all
function [x,y] = mysim(Sys,Exp,SimOpt)
Sys.A = [Sys.Apar Sys.Aperp Sys.Aperp];
[x,y] = chili(Sys,Exp,SimOpt);
end
PS:I know that there is an easiest solution for this example...