Reputation: 201
I am trying to look for a Python function that is the same as MATLAB's 'fit' function.
Specifically I am looking for something similar to the following MATLAB code:
fi = fit(bins, z, cubicinterp)
where z and bins are lists.
Upvotes: 2
Views: 4587
Reputation: 3461
Honestly, I think there are hundreds of Python functions to do exactly what you want (and much more).
Here is one example using NumPy, but seriously, just google it and you will be amazed:
Upvotes: 1
Reputation: 7805
Try SciPy's curve_fit() for general fitting of a function.
For specific interpolations, have a look at SciPy's interploation functions.
Upvotes: 4