From: Andras on
I have an m x n matrix where every row can be fit with a1*exp(-k1*t)+a2*exp(-k2*t)+...
exponentials, and I like to find the a, k set which gives the best fit
for the hole surface. I was thinking to use lsqnonlin or lsqcurvefit but
I cannot find the way how to use it for a problem like this as ydata
should be a vector. Does someone have any idea?