Questions on the use of Mathematica to construct models for approximating empirical data.

learn more… | top users | synonyms (1)

0
votes
1answer
125 views

Fitting a function

I defined and evaluated a function Max2[t_?NumericQ] := Log[Abs[-1 + First[Maximize[sol1[[2]][x, t], 0 <= x <= L, x]]]]; Now, I expect this to be close to ...
1
vote
3answers
195 views

Getting an equation of particular curve

How can I get an equation of the similar shaped curve? I've tried to get it like y = a + c x^2 + d x^3: ...
11
votes
6answers
8k views

How to determine the center and radius of a circle given three points in 3D?

I was wondering if anyone could give me a hand with this problem I have. I have six points on a plane, and I am trying to determine if they form a circle or not. I know that any three points in 2D ...
6
votes
2answers
174 views

Implement planar correction for skewed 3D profilometric data

I have some data that represents small-scale surface topography. The data is planar but not flat because it's impractical to level this microscope to a tolerance of microns. It looks like this: I'd ...
5
votes
2answers
408 views

Find parameters of ODEs to fit solution data

Problem How to find the initial conditions x[0],y[0] and the optimal value of parameters ...
4
votes
0answers
201 views

Using FindFit to fit nonlinear ODE parameters, subject to a constraint (an inverse problem) [duplicate]

Similar to this post I am finding that constraints tend to make FindFit poor at finding a good fit. However, unlike the previous post, the constraints are required ...
0
votes
0answers
131 views

How could I code the following nonlinear regression?

I am an extremely limited user of Mathematica. Could someone tell me how to set the following nonlinear regression problem : Y = Sum[a[i] F[i,X] , i = 1,4] ...
3
votes
2answers
251 views

fit a curve in a three dimensional space

I have a list of points of a curve in a three dimensional space, like ...
0
votes
0answers
41 views

How to fit ODE's coefficient, just like using NMinimize [duplicate]

I want to fit ODE's coefficients to a model. I tried using NMinimize, but it seems it does symbolic instead of numerical calculations. ...
2
votes
0answers
135 views

NonlinearModelFit is not giving the fit with minimum chi^2

First of all, a bit of background, I am using Mathematica to fit angular distributions of gamma rays, so I apologize for some of the serious messiness in the formulas. The data is simple I have three ...
2
votes
1answer
926 views

Having Trouble Fitting Complicated Exponential Function with FindFit

I am working on high pressure shock experiments and am trying to figure out a the temperature of a sample under strong shocks. I have a measure value from 4 wavelengths of a pyrometer and am using a ...
1
vote
0answers
121 views

LeastSquares with some parameters missing

I want to do a partial least squares (PLS) regression using LeastSquares on my data. The input parameters are temperature, humidity and pressure for a given date. ...
6
votes
2answers
861 views

How can I compute and plot the 95% confidence bands for a fitted logistic regression model?

I have a set of binary data that I' d like to fit a logistic regression model to and show the 95% confidence band around the fitted function. I can produce the regression model but how do I compute ...
2
votes
1answer
831 views

Combined fitting via NonlinearModelFit

I am trying to fit my data to a combined function model. Say I have two functions with some common parameter(s) f[x_]:= a*x^2 + b*x + c g[x_]:= d*x^2 + e*x + c ...
0
votes
1answer
127 views

Curve Fitting Errors

I am trying to fit a part of a dataset to the function $$ae^{-b\sqrt{x-c}}$$. My friend was using GNUPlot to this and got reasonably good results. However when I try to this with Mathematica : ...
3
votes
1answer
133 views

How to Use ProbabilityScalePlot with Censored Data?

I am trying to reproduce a ProbabilityScalePlot of censored data shown here (see Sample Analysis Plot). Here is my Mathematica code. First I deal with the uncensored case. ...
3
votes
2answers
478 views

FindFit for a differential equation model with multiple variables?

I'm trying to figure out how to use FindFit with a multivariable differential equation model and data. I've successfully made it work for the one-variable version ...
0
votes
1answer
68 views

LMS distance from a point to an InterpolatingFunction

I have a short script to NDSolve a second-order nonlinear BVP, which as its output produces an InterpolatingFunction object. I ...
2
votes
2answers
797 views
1
vote
2answers
217 views

Plotting a dynamical NonlinearModelFit Function

Currently I'm playing around with dynamics and the NonlinearModelFit function. To be precise, I want to fit a function the data, which range I want to specify ...
0
votes
1answer
129 views

fit recursive function to data

I have a function $g(x, n)$, which is a recursive expression: $x$ is a variable and $n$ the number of iterations. In my case $n=3$ for all $x$. An example is the following: ...
9
votes
1answer
784 views

Measure length and diameter of objects in an image

I am new to Mathematica, and I am trying measure length and diameter of rectangular objects in an image. I wanted to fit rectangles in the objects, and then get the values. Can I do that with ...
2
votes
1answer
1k views

Problem with NonlinearModelFit: “The function value… is not a list of real numbers…”

I'm trying to use NonlinearModelFit to fit the data: ...
0
votes
1answer
222 views

FindFit: why do I get negative value as result?

I am trying fo fit a model to data using FindFit. ...
5
votes
2answers
181 views

Transforming noisy multivariate data

I’ve been racking my brain all afternoon on trying to solve this… I have a set of noisy co-ordinate data data = {{x1,y1,z1}…..{xn,yn,zn}} that forms an ...
2
votes
1answer
288 views

RSquared Mathematica Excel incoherence

I've done a NonLinearRegression with this data ...
0
votes
0answers
40 views

NonLinearModelFit not generating a model without the use of “BestFit”, not sure why [duplicate]

This is my first time using NonLinearModelFit and I have run into an issue that I can't find an explanation for. The fitted model contains a ...
5
votes
2answers
447 views

Numerical Integration as Model for Nonlinear Fit

I'm trying to do a fit for parameters of a function within an integral but I'm getting errors when I try and run it. Essentially I want the following fit to work out: ...
1
vote
0answers
94 views

Can we ask ComponentMeasurements to use NonLinearModelFit to return a covariance matrix for underlying intensity data?

I'd like to be able to calculate a covariance matrix for some data underlying a morphological component. Provided this data, I can write something like: ...
3
votes
2answers
290 views

How do I find the best fit?

I am trying to solve following system of three differential equations ...
2
votes
0answers
582 views

ParametricNDSolveValue or NDSolve + fitting

I have been trying to find the value for the parameter kestim that yields the best fit of a model to some data points. datac has ...
3
votes
1answer
389 views

Generating a “best fit” curve to a set of noisy data corresponding to a moving object

Please note that this is an extension of a previous question: Interpolating a sparse list of two-dimensional coordinates We have an ordered array of coordinates corresponding to the position of an ...
1
vote
0answers
602 views

How to Output Chi-Squared Statistics when using NonLinearModelFit

I am using NonLinearModelFit for some curve fitting and I was wondering if NLM is able to output chi-squared/leastsquared statistics from the best-fit parameters and confidence intervals. From my ...
1
vote
1answer
111 views

How to find best MLE using `FindDistributionParameters`

This question is an extension of this question, if we change the initial values ...
2
votes
1answer
248 views

Problem with Covariance Matrix Output in NonlinearModelFit

I am running NonlinearModelFit based off of some simulated data and trying to fit to a function with more than one parameter. Eventually, I would like to fit to 5 ...
3
votes
1answer
666 views

How to make a multi-peak histogram fitting

I got a multipeak histogram from my data and want to fit it using a Gaussian Distribution function. ...
6
votes
4answers
4k views

Fitting a two-dimensional Gaussian to a set of 2D pixels

Imagine I have a set of data like the following: ...
1
vote
1answer
647 views

Keeping Nonlinear Model Fit Real

So I am using the NonlinearModelFit (NLM) command with a fairly simple function. There are 4 unknowns and the (x, y) points that ...
17
votes
1answer
350 views
2
votes
3answers
160 views

Removing of artificial sampling step effects

Look at this plot, it represents an underground interface between two formations, this interface should dip very gently left-downward, all the steps are artificial effects due to sampling. The natural ...
0
votes
0answers
93 views

Inconsistent results in fits from NArgMin

EDIT: Just realized I had misspelled "inconsistent." I'm using version 7.0. I'm trying to fit a (noisy) data set to a large-order polynomial. (Just for context: there isn't a model for the ...
3
votes
1answer
94 views

How do I test for the occurrence of an error message and act on it?

I want to see how well some curves fit a data set. If a curve doesn't fit after 100 iterations, I get the error cvmit. How do I test for and handle this error ...
13
votes
0answers
517 views

Nonlinear least squares on a GPU with Mathematica 9

Update: A Mathematica wrapper for (https://github.com/zitmen/cuLM) should allow for us to directly implement the Levenberg-Marquardt algorithm in CUDA for nonlinear least squares fitting. In a ...
3
votes
1answer
361 views

How do I draw a credible velocity vs. time graph using Locators?

This is partly a math question, partly a Mathematica question. For educational purposes, I'm making a simple demonstration to create a velocity over time graph from six locators. On the basis of ...
1
vote
0answers
200 views

To what extent can NonlinearModelFit be sped up?

Can NonlinearModelFit be parallelized or compiled to allow one to achieve a scalable speedup for a fitting procedure? Attempting to use this function to fit a ...
0
votes
1answer
405 views

Fit implicit function

Can anyone help me with fitting an implicit function to data? The function is given by: a*x^2 + 2*b*x*y + c*y^2 = e under the condition ...
2
votes
0answers
586 views

Linear regression with x and y errors

I have a question about finding a linear regression weighted with x and y errors. I found the answer provided by 0x4A4D in Estimate error on slope of linear regression given data with associated ...
0
votes
0answers
182 views

Interpolating function as a model in Mathematica's procedures for fitting

Is it possible to use interpolating function with parameters as a model for NonLinearModel fit (and other integrated methods for fitting)? Similar question was already posted earlier - How do I find ...