# Questions tagged [fitting]

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

1,156 questions
Filter by
Sorted by
Tagged with
1answer
64 views

### Ignoring one peak while fitting a Gaussian with multiple peaks [closed]

I have data that looks like this: When I try to fit a Gaussian to it, it obviously tries to fit the first peak, like so: This fit was found using ...
0answers
51 views

### Fitting results on two part graph

I have to do fitting of some experimental data that in the end should be represented like this: For the left part of graph from $(\pi,0)$ to $(0,0)$ experimental data is given as: ...
2answers
94 views

### Polynomial fit and Fourier transform plot

I'm pretty new to Mathematica so excuse me for obvious questions. I have a dataset, second column contains invoice amount and the first column contains days passed between each invoice date starting ...
1answer
71 views

### Evaluating fitted linear model [closed]

Apologies if this has been already answered, I have been fitting a linear model on some data and I am struggling to evaluate it later on. Dimensions[trainX] {...
1answer
73 views

### NonlinearModelFit : How to get the values of the individual parameters from the matrix “ParameterTable” [closed]

I just made a NonlinearModelFit : ...
0answers
32 views

### Does NonlinearModelFit result stores FitResiduals? [closed]

I fits a long data series with a complex model by NonlinearModelFit: fitnlm = NonlinearModelFit[...] Then I can use ...
1answer
55 views

0answers
39 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 ...
3answers
176 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 ...
1answer
70 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?
1answer
90 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 ...
1answer
40 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: <...
1answer
121 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 ...
2answers
91 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 ...
3answers
116 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 ...
2answers
80 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, ...
2answers
98 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 ...
0answers
29 views

### Fitting Categorical/Nominal Variable in NonLinearModelFit

I have a dataset with 4 continuous variable and 3 categorical variables. S far I have found a model which has all continuous variable using ...
2answers
69 views

### NonlinearModelFit doesn't seem to work with inverse function - please help!

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." ...
1answer
96 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 ...
1answer
63 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: ...
2answers
473 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: ...
1answer
124 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 ...
1answer
126 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 ...
2answers
254 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 ...
1answer
39 views

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

I want to find minima. My code: ...
1answer
51 views

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

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

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

What are the practical differences between: FindFit,NonlinearModelFit,and Fit. Do they call ...
2answers
77 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 ...
2answers
55 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 ...
2answers
67 views

### Partitioning Mixture Distribution Dataset into constituent Distributions

Suppose I have a dataset that is derived from a random sampling from a mixture distribution ...
1answer
80 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: ...
1answer
121 views

### Problem with fitting square root-like function

I have following data: ...