Questions tagged [fitting]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
23 views

FindFit;;nrlnum problem

I am trying to fit my experiment data to the equation but I have a problem as below. Could somebody can help me with this? I would really appreciate it! ...
0
votes
0answers
25 views

Error while using MultiNonlinearModelFit

I am trying to fit real and imaginary part of the Lorentzian function with shared variables for which I am using the MultiNonlinearModelFit, I am not able to get the fitted model and fitting ...
0
votes
1answer
78 views

Fitting a two-dimensional Gaussian to the image

I have a image which I want to fit 2d Gaussian function with that. I used the below codes but the output figure doesn't look alright. I extracted the mean and covariance values in x and y direction.I ...
1
vote
1answer
46 views

Smoothing a function after interpolation + trying to fit 3D data into model without accurate prior knowledge

I have a physical problem simulation that generates this data set in the two cylindrical coordinates $(r,z)$ (doesn't include $\phi$ dependence). The data set (see .wdx file) is in the flattened form $...
1
vote
0answers
46 views

linear interpolation error

I have two set of data for pressure and energy density and I used a linear interpolation to apply the data as a function in terms of each other. ...
1
vote
1answer
38 views

How to force LinearModelFit to return Non-negative coefficients?

LinearModelFit[{m,v}] will return a coefficients list $\beta$ from the design matrix $m$ and response vector $v$, where $m.\beta$ is fitted to $v$. However, the ...
1
vote
2answers
90 views

How to use Manipulate to place `Tooltip` for each data point on a ListPlot with a varying Linear Regression line

I want to build on an already developed Code given in: https://mathematica.stackexchange.com/a/183401/60365 For easy implementation, I applied it to a sample of 10 ...
2
votes
1answer
34 views

Multidimensional fit and interpolation for scattered unstructured data

I have data structured like {{{i,j},f(i,j)},...}}}. In my actual data the relationship between f(i,j) and ...
0
votes
0answers
35 views

Simultaneous fitting of two function with two data sets with same set of parameters

I am trying to fit two functions with two data sets simultaneously and the function is basically the real and imaginary part of the Lorentzian, I have the dataset which you can find in the link here ...
0
votes
2answers
81 views

Fitting Experimental data knowing the possible fitting formula

Good Morning, I have a set of experimental data which i want to fit with a formula that I know it works. I tried to write a code in mathematica notebook that I put it here ...
1
vote
2answers
47 views

how to extract CountryData[] without String names for use in numeric analysis

I have the following Code that extracts selected variables and makes a table. I like to use these data in statistical analysis such as ...
0
votes
0answers
32 views

Speeding up a Table with NMinimize

I have a parametric system of differential equations (a and b are the parameters). For every value of the parameters in a given range I want to find the right initial conditions to fit some ...
0
votes
0answers
23 views

Minimize and ParametricNDSolve

I'm trying to fit an observed orbit data={years,xobs,dx,yobs,dy} where xobs and yobs are the observed coordinates and dx,dy the corresponding errors. I must fit ...
1
vote
1answer
34 views

How to list the answer of Fitting Parameter?

I want to ask how to list the fitting parameter, using "Find Fit"? I have data such as, ...
1
vote
1answer
57 views

NonlinearModelFit with NDSolve

I have a series of data: data={{x1(t),y1(t)},...,{xN(t),yN(t)}} data represent a particle's orbit in the {x,y} plane. I would like to fit these observations with ...
1
vote
0answers
33 views

Help with FindFit for NIntegrate

I am trying to fit my data with below function to obtain certain parameter. ,where and . R is dependent variable and b is independent variable. td is a parameter I need to fit. I wrote my code at ...
0
votes
0answers
57 views

quality of fit measure

I have a list of data {x,y,f(x,y)} with f being an experimental number and x and y are parameters of the experiment. I am using NonlinearModelFit to fit a model function to these data, with a fairly ...
0
votes
2answers
96 views

fitting an ellipse to a data

I want to fit an ellipse model to a data. This sample data I extracted from a simple parametric plot of 2 Sin[t], Cos[t](Let's say, I don't know that) and I want to ...
1
vote
0answers
40 views

Finding specific x value when y axis is zero

If I have the following data: https://pastebin.com/4F7R0nW0 Which plotted using ListLinePlot[data, PlotRange -> {{80, 110}, {-0.020, 0.05}}] gives: Question: ...
1
vote
1answer
81 views

What can I do to get a better fit to my data?

I have started quite recently to use Mathematica and i found a problem, I'm trying to fit a function to my data, but i can't find the best fit around the minimum values (around 3.14). ...
2
votes
1answer
55 views

How meaningful, or useful, are parameter errors produced when perfroming an unweighted LinearModelFit or NonlinearModelFit?

This may be a question which teeters on the brink of belonging more to the realm of statistics and Cross-Validated SE, but I'm also specifically interested in Mathematica fitting routines. Usually, if ...
-1
votes
1answer
39 views

NonlinearModelFit with Discrete x variable

I have a dataset which is four observations taken in four discrete cases. I would like to use NonlinearModelFit in Mathematica to fit the data to a relatively complex function to predict these ...
1
vote
2answers
93 views

Fit 3d data to a torus

I'd like to find the best fit coefficients "a" and "c" for a toroidal surface, to a list of {x,y,z} points which are approximately on the surface of the torus. I believe I need <...
1
vote
2answers
48 views

Given data, how to FindFit for function that returns the Last of the “ValuesOnGrid” for InterpolatingFunctions returned by multiple NDSolve-s

I have tried both, NDSolve and ParametricNDSolve, to tackle the following problem without success. I have looked at 2 other SE ...
1
vote
0answers
20 views

Variable order in InterpolatingFunction

I'm attempting to deal with a interpolating a function $f[x,t]$ on an unevenly spaced grid of $n$ points. My x-variable is continuous, so there's no difficulty in fitting a cubic spline to it with ...
1
vote
0answers
40 views

Improve NIntegrate + fit

I need to improve the performance of my fit. Below you can find the data I am using ...
1
vote
1answer
83 views

Confidence interval

With data = {{0.002, 2.51053}, {0.004, 2.54217}, {0.006, 2.55543}, {0.008, 2.54247}}; I obtain a linear fit 2.51038 + 5.454 x; ...
6
votes
3answers
438 views

Multivariate linear regression

Say I have a 4-dimensional data set with two independent variables x1, x2, and two dependent variables y1, y2, i.e. each row is <...
0
votes
1answer
39 views

how can I make a trend line fit close to (0,0) but not include (0,0) in my data?

I have five data sets, {4.88281 10^(-5), 0.0788}, {9.76563 10^(-5), 0.1014}, {0.000195313, 0.12455}, {0.000390625, 0.15594}, {0.0015625, 0.18587}. I was using EXCEL to add the trendline, but the x ...
6
votes
2answers
118 views

Prony series with a large number of terms

A Prony series is similar to a Fourier series but can have fewer terms. It takes the form $\sum_{i=1}^{M} A_i e^{\sigma _i t} \cos \left(\omega _i t+\phi _i\right)$ Note that unlike Fourier series ...
4
votes
2answers
110 views

Find the best fit with some conditions

I have this code to find the best values for $l$, $s$ and $j$: ...
3
votes
1answer
106 views

How to perform fitting with convolution of two functions in Mathematica?

I have an experimental data as shown bellow. ...
7
votes
4answers
2k views

Bad linear fit for simple data

I have some data : ...
3
votes
1answer
65 views

Fitted equation with Predict

Is there a way to know the fitted curved from the function Predict when choosing the linear regression method. I am using this data: ...
4
votes
1answer
69 views

How can I plot this one-dimensional Self Organizing (Kohonen) Map?

Mathematica used to have a package called NeuralNetworks that is not currently working. With that package, you could create a Kohonen or Self Organizing Map (https://en.wikipedia.org/wiki/Self-...
4
votes
1answer
124 views

Fitting Lorentzian function

I'm trying to fit a Lorentzian function to my data, but i can't find the best fit. The model used is ...
4
votes
1answer
72 views

Detecting Lines in Data

I have some data representing a vaguely periodic signal, here is a sample ...
5
votes
4answers
391 views

Fitting a very simple dataset

I am a beginner in Wolfram Mathematica. I am trying to fit the data from a CSV file using FindFit. In doing so, I am getting the following error message ...
1
vote
3answers
102 views

Non linear model fit with trigonometric model

I tried to fit the curve of the dataset. I used 'Nonlinearmodelfit' function to get the specific fitted equation. Yes, I can get the result, but I am wondering there is a way to improve the result. ...
1
vote
2answers
76 views

FindFit with a Sin function

I'm trying to find the fit of Sin-shaped weather data that is provided by Wolfram. My code is as follows: ...
1
vote
2answers
138 views

FindFit problem, some models work — and some do not

I asked this question. Answers and comments were appreciated. But (some) of the comments did not make satisfied. [Maybe due to my bad English I did not describe my problem very well]. Let me try ...
1
vote
3answers
123 views

FindFit, FindFormula, Fit, NonlinearModelFit - Which one to use? (I got no good curves & plots)

See this code, what mistake I did? (I got no plot) ...
3
votes
2answers
308 views

How to drop points that don't lie in a line

I have some data like: ...
1
vote
0answers
39 views

Fitting an integral function given data points

I have a set of measures of the resistivity of a given material at different thicknesses and I'm trying to fit them using the Fuchs-Sondheimer model. My code is: ...
3
votes
2answers
138 views

Problem with FindFormula for experimental dataset [closed]

I have a dataset whose mathematical model is unknown. There is my code. ...
4
votes
2answers
131 views

Calculate combined standard deviation

If I have a data that I fit with NonlinearModelfit that fits a data based on two fitting parameters, c1 and ...
0
votes
1answer
65 views

Restrict gaussian multi-peak fitting by area

I am trying to implement the code developed by @MarcoB here: Multi-peak fitting and area of the fitting but trying to restrict the fitting of the peaks by the area, height, the width and the position, ...
0
votes
1answer
53 views

Fitting an integral function given a set of data points

I have a set of measures of the resistivity of a given material at different thicknesses and I'm trying to fit them using the Fuchs-Sondheimer model. My code is: ...
0
votes
1answer
54 views

NonlinearModelFit on functions with NIntegrate doesn't give the right parameters

I have read some of the threads in the forum and tried to fit my data using nonlinearmodelfit, but the fitting result doesn't match the data at all. I set the initial fitting parameter values ...
5
votes
2answers
127 views

Remove baseline from curve

I am trying to use a code written by @Mr Wizard here: Subtract list with part of the same list to remove the baseline of a curve and have the baseline be at zero. The code is as follows: ...

1
2 3 4 5
28