> ltemp = [ydata[i] - ydata[0] for i in range(ll)]
> ytemp = [ltemp[i] * .001 for i in range(ll)]
> ltemp = [xdata[i] - xdata[0] for i in range(ll)]
> xtemp = [ltemp[i] * .001 for i in range(ll)]
Use the vectorization given by numpy:
ytemp = (ydata - ydata[0]) * 0.001
Below I’ve included the code I ran, reasonably (I think) commented. Note the
reference to the example. The data actually came from a pandas data frame that
was in turn filled from a 100 MB data file that included lots of other data not
needed for this, which was a curve fit to a calibration ru
Hi Bill,
Thanks for your suggestion. Where am I actually using the curve_fit in the
defined function func2fit? Don't I need to initial assumption of a, b and c
values so that optimized convergence occur with iteration of the function for
the input data of x?
Look forward to your suggestions,
M
> On Mar 28, 2019, at 7:54 AM, Madhavan Bomidi wrote:
>
> Hi,
>
> I have x and y variables data arrays. These two variables are assumed to be
> related as y = A * exp(x/B). Now, I wanted to use Levenberg-Marquardt
> non-linear least-squares fitting to find A and B for the best fit of the
>
Hi,
I have x and y variables data arrays. These two variables are assumed to be
related as y = A * exp(x/B). Now, I wanted to use Levenberg-Marquardt
non-linear least-squares fitting to find A and B for the best fit of the data.
Can anyone suggest me how I can proceed with the same. My intentio