# Questions tagged [fitting]

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

1,339 questions
Filter by
Sorted by
Tagged with
35 views

Writing: ...
69 views

### How to find the fit for a numerical solution

I solved numerically a differential equation and I found a solution (solution that can be plot). I also tried an Ansatz to find an analytical solution and I got an expression. Using the numerical ...
111 views

Writing: ...
180 views

### How can I generate a best fit quadratic function?

This is my first time using mathematica so I'm pretty confused. This question is based on the Sierpinski Triangle. The figure below shows the percentage of total even entries and total odd entries ...
160 views

### Fitting data using a parametric differential equation

I was fit the data using differential equation(eqns) and pfun I tried data fitting (I gave the parameter directly..a=22500, b=10^-22, c=2*10^-40 and scaling factor k=1.04 10^-36) ...
330 views

### Fitting of 2d data points with a function considering scaling, rotation and translation

I have the following set of 2d data points: ...
214 views

### Exact function that generated the data

I have "data" points as given below (e.g., for x-value = 1, the corresponding value of y is -23.110606616537147. (I apologize, it is rather large data array.) I need to find out the exact function ...
856 views

### Multi peaks fit (Voigt, Lorentzian or Gaussian)

I have started quite recently to use Mathematica and I don´t have experience in coding. What I need to do is to fit a peak which probably is a combination of two Voigt or Lorentzian. I have tried ...
546 views

### How do I find the root mean squared error of this fit?

I have the following data. ...
179 views

### Making batch data fitting robust — why does NonlinearModelFit fail occasionally?

I have over 1000 spectra I would like to batch fit and then use the results for further study. I'm not fitting anything especially complicated just a Lorentzian of the form, y(x) = A \frac{\gamma^{...
40 views

### Define output as the input

I want to find fitting parameters and then I want to use those parameters my further calculation. I used the following command for the fitting and I got values for the parameters. How should I define ...
221 views

### Automatically fiting experimental data using NonLinearModelFit

Please, I have been working for some time to perform an automatic fit of my experimental data using an analytical function developed from a model based on the theory of kinematical diffraction. The ...
79 views

### Gaussian fit with two variables

If I have an expression where two unknown parameters and a certain range of one parameter are present then how I can get best fitted values of such two parameters by varying this range?
101 views

### Properties of an arbitrary (i.e., not fitted) statistical model

Suppose that I have a data and a statistical model that is not the result of fitting, but has a different origin. For example, I have a list of measurements and a ...
56 views

### Fit data with a given function depending on parameters

I want to fit the data of a star's temperature with a function from a model. That function depend on several parameters. I want to know how can I find the value of those parameters. The data is: <...
131 views

### Fit this data to a model in mathematica [closed]

I need to find a distribution or a model to fit this data set in Mathematica ...
97 views

### Obtaining the polynomial describing the motion

I have the following data points: Clear["Global`*"] dados={{0,0},{1,1000},{2,-750},{3,250},{4,-1000},{5,0}}; From these data I obtained the following ...
173 views

### How to get a plot with more precision in the data points?

Working with other software called SolidWorks I was able to get a plot with a curve very close to my data points: I tried to get a plot as accurate as this, but using the ...
125 views

### How to draw lines connecting nearby points [duplicate]

Suppose I have the following example data, data = Table[{Cos[theta], Sin[theta]}, {theta, 0, 2 Pi, Pi/8}]; which, when plotted, looks like this, ...
103 views

### Listplot, Plot and e function bug

For a project I have, I have let a program calculate required interias and friction for my system are R and J in the params. That program calculated 0.5*10^-3 and 0.013~ respectively. I'm trying now ...
80 views

I have the following defined: lvf1 = Table[{i, 1/(10 - i)}, {i, -100, 100}]; If I just run this, it gives me a "Power: Infinite expression 1/0 encountered." ...
98 views

### Linear mapping to fit points to subset of other points

I have some set of points making a specific pattern. I want to find a linear mapping (dilations + translations) to find a similar pattern in a second larger set of points. I want to find the best (or ...
84 views

### Forcing a 2D nonlinear fit through a set of points

I am trying to fit a set of data points using exponential functions as the underlying process suggests an exponential decay. The data points are: ...
713 views

### Fitting PDF to two normal distributions

I'm trying to fit this data As you can see there's two peaks. I want to fit this curve with two normal distribution with the same variance but different mean. So far I've got this: ...
250 views

### How do I access individual groups after using GroupBy on a Dataset object?

I want to read in an xlsx (Excel) or TSV (tab-delimited) file, assuming this results in a rectangular table of data. Then I after applying GroupBy (using multiple keys), I should have several ...
267 views

### Find interpolation with derivatives at some points

I am trying to find out how to find a good interpolation of a periodic function I have from some data points. The only problem is that I need to make sure that derivatives at the starting and ending ...
279 views

### Problem in using FindFit

I have the following set of data data={{0,0,0},{0,2,1},{0,4,2.247},{0,6,3.627},{0,8,5.031},{1,0,3.346}}; where the values are {n, L,$\varepsilon$} and satisfy ...
90 views

### How to find minima for non scalar-valued [closed]

I want to find minima. My code: ...
53 views

### How to pass starting values in matrix form?

Consider the following MWE, where I try to pass starting values to FindDistributionParameters[]: ...
570 views

### What are the practical differences between Fit, NonlinearModelFit, and FindFit

What are the practical differences between: FindFit,NonlinearModelFit,and Fit. Do they call ...
78 views

### Evaluating a formula that uses summations and products of vectors

Could someone tell me how to find beta1? I have the following data: I don't know how to write beta1, and I don't find anything ...
64 views

### Difficulty fitting an equation to a data set using exponential growth and logistical growth [closed]

I'm having an extremely hard time getting linearmodelFit, findFit, or nonlinearModelFit to give me an output that I can work with and I can't seem to find the problem. My list is ...
106 views

### Partitioning Mixture Distribution Dataset into constituent Distributions

Suppose I have a dataset that is derived from a random sampling from a mixture distribution ...
90 views

### Estimation of the error for zero degree of freedom fit with error bar

I am performing a fit on experimental data with zero degree of freedom but with error bar using NonlinearModelFit: ...
182 views

### Problem with fitting square root-like function

I have following data: ...
45 views

### Simultaneous fitting of polynomial parameters to data [duplicate]

I have two following data-sets: ...
87 views

### Fitting complex equation

I used the following code for fitting but it does not produce an output.I kept it nearly 3 to 4 hours but it does not give any output. How should I make it correct?I have used two equation(f1,f2).I ...
300 views

### How to do good surface fitting in Mathematica?

I would like to fit a 3D surface in Mathematica, and I can do a rough fitting using the following code: ...
88 views

...
54 views

### Get properties of a list of fitted models (objects)

If I do a fit, such as nlm = NonlinearModelFit[data, {x^a Cos[b x + c]}, {a,b,c} ,{x}] then you return a FittedModel object, ...
64 views

...
129 views

### Problem using Nonlinearfit on integral function

I tried to fit my data with a very complicate Integrated function. But I get many errors messages when I perform the fit. For exemple I get : NIntegrate::inumr: The integrand ....has evaluated to ...
246 views

### Model fitting for concave curve: test if asymptote or convergence exist

I am asking a double check if conceptually I set up proper model and proceeding in good direction to drive conclusions. I have a distribution that looks like this: I want to test if for increasing x ...
426 views

### Fit Gaussian Function [duplicate]

I want to fit the Gaussian Function for the following data. How should I do it? ...
421 views

### Quantile Regression using Neural Networks (Custom Loss function)

I would like to perform a Quantile Regression within Mathematica's neural network framework. Since there exist a couple of tutorials for this exact problem in Tensorflow, i.e. Deep Quantile ...
47 views

...
130 views

### Why does the PearsonChiSquare from FindDistribution and DistributionFitTest differ by a factor of $10^{20}$?

This is similar to the unanswered "Why the results of FindDistribution and DistributionFitTest are not consistent?" My more specific question is: Why do the PearsonChiSquare values for ...
65 views

### What is the best fit for this data?

First I entered the data and graph it, then I used the non-linear adjustment command to have a model of my data, I asked Mathematica for the square r, to know how good the model was, then I put ...