12345678910111213141516171819202122232425262728 |
- function fv=fitSingleZero(globalPar, cax)
- %par is a nfunc x npar matrix of coefficients
- %globalPar is a row vector of global coefficients
- %cax is a column vector of time instances
- %cay are the function values
-
- %oneVector=ones(1,size(cax,1));%column vector
-
- A=globalPar(1);
- tau=globalPar(2);
- alpha=globalPar(3);
- dt=globalPar(4);
-
- cax1=cax-dt;
- if tau==1/alpha
- fv=cax1.*exp(-cax1/tau);
- else
- fv=tau*(exp(-alpha*cax1)-exp(-cax1/tau))/(1-alpha*tau);
- end
- fv=fv*A;
- sel=cax1<0;
- fv(sel)=0;
- %fv=A*power(cax,alpha).*exp(-cax/tau)/power(tau,alpha);
-
- end
- %par=ones(2,
|