0
tempo=Seq;
conc=NCelTotais;
coef_ini = [MaxCT 1 2];
coef=[];
OPTIONS = optimset('MaxIter',1000,'TolFun',0.001,'TolX',0.01);
coef = fminsearch(@funcaoerro_sigmoide,coef_ini,OPTIONS);
A=coef(1);
B=coef(2);
C=coef(3);
y = A*sigmf(tempo, [B C]);
fNCelTotais=y;
where:
**funcaoerro_sigmoide**
function erro = funcao_sigmoide(coef);
global tempo conc;
A=coef(1);
B=coef(2);
C=coef(3);
y = A*sigmf(tempo, [B C]);
erro1 = (conc-y).^2;
erro=sum(erro1);
You should describe your problem better so we can help you.
– Leandro Angelo
There’s a package that does that, see matconv and its Vignette.
– Rui Barradas