Ping,

You should investigate scipy.optimize.lsqFit for using least squares
to fit an arbitrary function and scipy.odr for regular or orthogonal
least squares fitting.

barry

On Dec 5, 2007 9:45 PM, Ping Yeh <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have (x,y) data that I want to fit to the formula
> y = a * x^b
> to determine a and b. How can I do it? The current
> manual only lists linear fit and polynomial fit.
>
> Or, putting it in a more general setting, is there a
> module to do fitting to an arbitrary function?
> It would be something like
>
> pars = fit(x, y, func)
>
> where func is a function like
>
> y = func(x, pars)
>
> with pars a 1-D array.
>
> Thanks,
> Ping
>
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to