exponential decay fit - slow



Hello,

I am currently using fmincon to fit approximately 5000 independent
exponential decays one after another.

conditions:
options=optimset('Display','Off','TolX',1e-9,'MaxFunEvals',500,'MaxIte
r',500);

FittedDecay =
fmincon(@func1com,starting,[],[],[],[],lb,ub,[],options,x_data,y_data)
;

For this I am using a loop which makes this process very slow. does
anyone know what would be the best way to speed this up? Would it be
possible to fit the decays simultaneusly using a 2d matrix as opposed
to a 1d vector? would this speed this up? Any help would be greatly
appreciated.

cheers,
Jason
.