I'm trying to fit a curve to model responses from a direct mail campaign over time. Using R, I was a able to get a shape and scale factor using the fitdistr() function. Then I use the shape and scale as parameters in the weibull() function. However,
I am trying to fit the background shape in nmr spectra. For this I have been using the loess function so far. First I try to identify all the peaks (which works more or less) and remove them from the spectrum. Then I try to fit the rest of the spectr
I'm trying to fit a histogram with some data in it using scipy.optimize.curve_fit. If I want to add an error in y, I can simply do so by applying a weight to the fit. But how to apply the error in x (i. e. the error due to binning in case of histogra
I am trying to use curve fitting under Matlab. There are two kinds of spline in Matlab: piecewise polynomials and b-spline. For b-spline, we know that the basic functions can be derived by means of a recursion formula. You can see the below link: htt
I have a video of a giant whirlpool, similar to the below image Can anyone give an algorithm / code to detect SPIRAL OPTICAL FLOW? Is it possible to fit a spiral curve over it depending on the spiral optical flow? If yes how? Thank you. -------------
How do I perform a fit through the most dense regions of the z <- (x,y) presented on the plot attached? The thing is that i tried locfit(z~lp(x,y)) but instead of a line in 3d space I received a plane fit.
I'm trying to fit some linear lines to curves, they behave linearly near 0 and then do odd things. But I need their behavior around zero. Now I've written a little script, and it does not work at all for some curves, while it does others perfectly. A
Is it possible to fit an A*sin(B*t+C) function with GSL or a similar library? i want to get the A and C parameter of a sine wave present in 4096 samples (8bit) and can provide an good approximation of B. A think that should be possible with GSLs non-
I have a "for loop" that runs over 100 range values and for each value, I call scipy.optimize to do a non-linear curve fitting. When I run it on a 4-core desktop, I see the CPU utilization as 100% which is just 1 core fully used. I want to use multi
How can I fit my data to an asymptotic power law curve or an exponential approach curve in R or Python? My data essentially shows that the the y-axis increases continuously but the delta (increase) decreases with increase in x. Any help will be much
I have a experimental data to which I am trying to fit a curve using UnivariateSpline function in scipy. The data looks like: x y 13 2.404070 12 1.588134 11 1.760112 10 1.771360 09 1.860087 08 1.955789 07 1.910408 06 1.655911 05 1.778952 04 2.624719
I have a two dimensional data set, of some fixed dimensions (xLen and yLen), which contains a sine curve. I've already determined the frequency of the sine curve, and I've generated my own sine data with the frequency using SineData = math.sin((2*mat
I need to draw curves with Qt: The user clicks on QGraphicsScene (via QGraphicsView) and straight lines are drawn between the points clicked on by the user. When the user finishes to draw straight lines (by clicking on the right button), the set of l
I'm trying to implement a way to visualize magnetic fields and after some googling I settled on using Catmull Rom Splines to create the curves necessary. One of the things I wanted to do however was have arrows move along the lines to indicate direct
I have a data.frame of values with samples taken at intervals that were not exact hours. The samples form oscillating waves of unknown amplitude and period. I would like to estimate the value at every exact hour. hours value 60 63.06667 22657 61 64.0
How can I fit this equation to a set of data (x,y) y = a x ^ b + c I tried least square error method and power low but it doesn't work! --------------Solutions------------- I solved it! Y = a x ^ b ; Y = y-c so 'a' and 'b' can be obtained from least
I'm trying to fit some data from a simulation code I've been running in order to figure out a power law dependence. When I plot a linear fit, the data does not fit very well. Here's the python script I'm using to fit the data: #!/usr/bin/env python f
I am trying to fit a function which takes as input 2 independent variables x,y and 3 parameters to be found a,b,c. This is my test code: import numpy as np from scipy.optimize import curve_fit def func(x,y, a, b, c): return a*np.exp(-b*(x+y)) + c y=
I have a single function that I want to fit to a number of different datasets, all with the same number of points. For example, I might want to fit a polynomial to all rows of an image. Is there an efficient and vectorized way of doing this with scip
I have various plots (with hold on) as show in the following figure: I would like to know how to find equations of these six curves in Matlab. Thanks. --------------Solutions------------- I found interactive fitting tool in Matlab simple and helpful,