[SciPy-User] [SciPy-user] How to use Least square fit to fit three functions

josef.pktd@gmai... josef.pktd@gmai...
Wed Feb 8 08:21:38 CST 2012

On Tue, Feb 7, 2012 at 9:39 AM, suzana8447 <k-assem84@hotmail.com> wrote:
> Hello,
> I would really appreciate if someone suggest me how to use least square fit
> (scipy) to fit three functions at the same time because i looked at the
> website site of scipy-least square:
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.leastsq.html
> http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.leastsq.html
> and I realized that lesatsq takes only one function as an argument. Is there
> any way to let leastsq fit three functions for example?

stack them into one array

If you need different weights for the 3 functions, then the easiest
would be to use optimize curve_fit.


> Thanks in advance.
> --
> View this message in context: http://old.nabble.com/How-to-use-Least-square-fit-to-fit-three-functions-tp33278985p33278985.html
> Sent from the Scipy-User mailing list archive at Nabble.com.
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

More information about the SciPy-User mailing list