# Questions tagged [curve-fitting]

For questions about determining parameters for particular functional form based on set of given data points. These points may be the exact values generated from some underlying function or possibly have some additional noise component.

55 questions
Filter by
Sorted by
Tagged with
1 vote
70 views

### Fitting a rectangle-function to a signal in Python

I have a measured signal (current of a motor, turning on and off again) to which I want to fit a rectangular function in python. I came up with a reasonable ...
• 121
1 vote
77 views

### What are the Exact Rules for Significant Figures, Precision, and Uncertainty?

In the physical sciences (which are physics, chemistry, astronomy, materials science, etc.), we learned that the uncertainty is +/- the smallest unit (which is 1) of the last significant figure if the ...
37 views

### Computing the overlapping area of curves

I have a set of datapoints that correspond to 5 curves. Sample dataset and MATLAB inputs: ...
• 447
41 views

• 33
4k views

### Why is my curve_fit not producing the covariance matrix and the correct values for the unknown variables?

I am trying to fit supernova data into a scipy.curve_fit function. However, when my code runs, the values of the unknown variables given by ...
• 43
1 vote
176 views

### Fitting line to a staircase function

I have a staircase/step function $n(E)$. I know the points $\{E_i\}$ at which each "step" occurs and all steps are of constant height 1. I need to fit a line $a + bE$ to this function and ...
• 13
140 views

### Computing infinite series with iterated functions

I found this question (linked here) which asks to find what this infinite series converges to $$\sum_{n=1}^{\infty} \int_0^{\pi} f_n(x) dx$$ where $f_{n+1}(x) = \sin(f_n(x))$ and $f_1 = \sin(x)$. ...
• 111
911 views

### Fitting using curve_fit of scipy in python gives totally different answer for 1/t and t

I was trying to fit some data to a single degree exponential decay function but a*exp(-x*t) and a*exp(-x/t) gives completely ...
• 107
64 views

### Pade-like approximation, but force poles to be negative

Are there techniques to form a Pade approximation (or Pade-like approximation), except force the poles of the rational function to be negative? I am trying to use Pade approximations to extrapolate a ...
• 3,023
93 views

### How to curve-fit the lower envelope of random sequence?

I'm more or less familiar with procedures and methods to fit a curve to experimental data, and I have done this many times using Matlab. However this time I have a problem that I'm not sure how to ...
357 views

### Good languages/packages for interior point optimization with non-linear constraints?

I'm currently using Python's scipy.optimize package to perform parameter estimation for a system of 10 ODEs. I have some observed data, and I'm trying to find the set of parameters which makes the ODE ...
• 143
199 views

### Dealing with arrays and fit function in Gnuplot

I want to evaluate the Birch-Murnaghan Equation of State (BM-EOS) for different volumes. I tried declaring a 1D array A in which every element would be the answer ...
• 111
55 views

### Least-squares fit of explicit parabolic sheet to data points

For a given set of data points $$\{(x_i, y_i, z_i)\}$$ there exists some $$f_{ABC}(x,y)=Ax^2+Bxy+Cy^2$$ that minimizes $$\sum_i(f_{ABC}(x_i,y_i)-z_i)^2$$ $A$, $B$, and $C$ can be found quickly ...
• 255
100 views

### Fit spline to point cloud with lowest energy

I am looking for a way to fit a spline of order 2 to a 2d image or point cloud. The input will be an gray scale image. The start and end points are given as 2D coordinates. The goal is to find a ...
44 views

### Good 3D surface fits for multiscale oscillatory surfaces

I have a 3D surface in $x$, $y$, and $z$. where $z$ is a function of $x$ and $y$ and my points are on a structured grid in $x$ and $y$. My function $z$ is highly oscillatory and irregular with ...
• 1,902
1 vote
41 views

### Fitting a multivariate PDE (using Java)

I'm doing simulations of 2 coupled PDE's with Comsol Multiphysics. I want to fit some data (using the Application method, whose language is Java) to those simulations. In order to answer my question ...
• 171
1 vote
15 views

### Error on the fit parameters when several good fits exist

I am using the reduced chi-squared statistic to determine the goodness of fit. I run several simulations and determine that a parameter 'p' has a certain range of values that all give values between 0....
• 111
284 views

### What is a good library in Python for correlated fits in both the $x$ and $y$ data?

I have $x$ and $y$ data, both of which have their own covariance matrices. scipy.optimize.curve_fit will accept a covariance matrix for the $y$ data, called ...
• 311
50 views

### Fit exponential convergence

I'm working with a numerical algorithm whose output $y$ asymptotically approaches a certain unknown value $a$. I expect an exponential convergence, i.e. the data $y$ given by my algorithm should be ...
• 203
1 vote
223 views

### identifying peaks in data

I have data with peaks on some background, for example: The two prominent peaks at ~390 and ~450, as well as the much smaller peak at ~840. What are some options to programmatically find the position ...
• 111
183 views

### How to check experimental data against a theoretical curve? (Python)

I am trying to check the agreement of a dataset against a theoretical curve, specifically a bandstop filter in an RLC circuit. I have generated a function which describes the curve we expect from the ...
• 21
1 vote
1k views

### Gnuplot: How can I determine the maxima of a fit function in gnuplot?

I have a set of data data.txt which can be fit to a Gaussian function, f(x). I want to determine the coordinates of the point of ...
• 61
1 vote
5k views

### Gnuplot: How can I fit a range of points (out of the entire data) to a function?

I have a set of data obtained for the I-V characteristics of an LED. ...
• 61
600 views

### What equation should I fit this set of data points to?

I have done an experiment Estimation of silver nitrate by potentiometric titration with standard KCl solution. A plot of $\dfrac{\Delta E}{\Delta V}$ versus Volume of KCl solution gives the ...
• 61
2k views

### Numpy.polyfit with regularization

I am trying to use the numpy polyfit method to add regularization to my solution. My non-regularized solution is ...
63 views

### Finding parameters numerically

I suspect that a function $f(x,y)$ is of the form $f(x,y)=a(bx+c)^{dy+e}$. I have access to several values of $f(x,y)$. How do I proceed numerically to find the parameters $\{a,b,c,d,e\}$? By ...
• 103
1 vote
51 views

### Fit constant term in LM algorithm

I'm using the Levenberg-Marquardt algorithm to fit my data with a Gaussian function: $$f(x)=a\cdot e^{-\frac{(x-c)^2}{2\sigma^2}}+f_0$$ $a$, $c$, $\sigma$ and $f_0$ are the fitting parameters. The ...
• 131
1 vote
162 views

• 163
217 views

### Choice of solver/software for global optimisation of cheap black-box function with known derivatives

I am trying to estimate a few unknown parameters of my continuous non-linear PDAE model (simulated through finite-volume method spatial discretisation, and time-stepping through method-of-lines). I am ...
3k views

### Fit best polygon to a discrete contour

I have a discrete contour represented by a set of points. The contour looks like a polygon but if you zoom you see that the edges are rugged (that's because it was obtained while working on a finite ...
• 965
96 views

### Post-processing the noisy results of numerical simulation

I have the following curve, which is calculated on a large number of points and shows smooth behaviour when viewed from distance. However, the derivative (shown below) exhibits artificial ...
• 430
1 vote
173 views

### Finding an enclosing parabola for a set of points

I am looking for an algorithm that fits a parabola to a set of data points. However, no data point may be below the parabola. All points must be above the parabola. Is there an standard algorithm for ...
• 111
1 vote
1k views

### Curve fitting for oscillating data

This is my first question. I have the following data that I'd like to approximate as a parametric function: \begin{align} y = a + (bx_1 + cx_2 + dx_3 + ex_1x_2 + fx_1x_3 + gx_2x_3 + hx_1x_2x_3 + i)*(...
1k views

• 119
1 vote