# Questions tagged [fitting]

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

1,649 questions
Filter by
Sorted by
Tagged with
1 vote
54 views

### How to speedup calling the interpolation function? [duplicate]

Consider the following data: ...
• 5,092
34 views

### Fit curve line doesn't extend over the correct domain

I'm trying to plot points as well as a non-linear fit function onto the same image. I used the command: ...
32 views

### Performing Tobit Regression in Mathematica by Maximum LogLikelihood

I am trying to estimate a tobit model by maximum likelihood method in Mathematica. I can not find the build-in function. So I try to perform it manually. Here is the log likelihood function of Tobit ...
22 views

### Using FindFit for Approximation Fourier Series

I am expecting to have a list of discrete points, which I would like to approximate using Fourier's series, then plot Fourier series approximation alongside with discrete points, then plot terms of ...
71 views

### 'NonlinearModelFit' for SIR ODE model, and adding a penalty function (soft constraint)

This is a modification of the question Is it normal that adding constraints on the parameters of NonlinearModelFit increases execution time 100 times?? I want a program that fits a SIR model to ...
• 1,314
1 vote
76 views

### How to plot a curve with an experimental plot [closed]

There is an experimental curve in this paper : https://arxiv.org/pdf/1211.2616.pdf ( Fig. 21. ) I want to make a new plot of the experimental curve with my theoretical model curve. How to do so by ...
• 323
88 views

### Is it normal that adding constraints on the parameters of NonlinearModelFit increases execution time 100 times??

Normally, reducing the optimization domain by adding constraints should reduce the time of execution. In my case however, this puts the NonlinearModelFit in a coma. Without constraints, 8 seconds ...
• 1,314
46 views

### Can constraints on the parameters be imposed in NonlinearModelFit? [closed]

Hi I cannot figure out this from the documentation of this command. For example, take one of the examples in the documentation, where I also added initial guesses for the parameters. ...
• 1,314
426 views

### How to force fit of the data to exactly match one of its points?

Consider the following data: ...
• 5,092
99 views

### Fitting NDSolve solution to data

I have a system of DDEs with 2 free parameters I solved with NDSolve, as you can see below ...
1 vote
58 views

### Finding knot vector for Spline fitting

I have the following code from Mathematica: ...
• 45
103 views

### How to find Specific Fit of a Distribution?

I want to fit a data set: ...
• 1,238
77 views

### (Beginner question) How to solve large gradient region from experimental data?

I have a data like this. data ={100, 103, 101, 105, 100, 80, 83, 70, 71, 60, 40, 43, 20, 22, 10, 5, -1, -3, -2, 0, 1, 4, 3, 8, 7, 4, 3, 1, 0, 1, 2, 10, 5, 2} ...
• 99
80 views

### Nonlinear model Fit [closed]

I am trying to fit my data to the function: a + (b*(c/2)^2)/((T - d)^2 + (c/2)^2) I entered nlm = NonlinearModelFit[data, a + (b*(c/2)^2)/((T - d)^2 + (c/2)^2), {a, b, c, d}, T] However it returned [0....
• 33
121 views

### Fourier series fit doesn't consider different local maxima of the data

I'm trying to appropriately fit a fourier model to experimental data. But the problem is that the resulting fit doesn't consider the varying local maxima of the data. Here's the data: ...
63 views

### How to fit piecewise functions with unknown domain?

Thank you for your comments, I will discribe the question in more detail. I have a piecewise function as below and I'm looking for the parameters :...
• 1
94 views

### Fitting a 2D elliptic paraboloid

I have a set of data as follows: ...
• 79
45 views

### How to archive scatterplot with randomly jittered x-values for visualization purpose? [closed]

I want to fit my data or just plot a figure with randomly jittered x-values like this: Here I give an example: ...
• 28
239 views

### Curve tracing for a given data set

I want to trace the curve for the given data set. This is my code ...
• 1,094
101 views

### How can I find an intermediate function between a set of functions?

I have 5 nonlinear functions, which are very complex and long. For this reason I will not include them here. But the plots of four of them are given here: I am looking for some functionality which ...
• 989
1 vote
73 views

### Fitting data with results generated from a numerical model

I have system of 10 equations that I am solving to try and model some data collected. The model using the real world values doesn't produce the best result so I wanted to try and fit the model to the ...
• 182
260 views

...
• 4,005
132 views

### Arbitrary shape cut into triangles and packed into rectangle of the same area

I've been trying to code this idea in lots of different approaches but I've reached a wall here. Mathematica isn't my strong suit and I've been unable to find a solution to the RegionMeasure error. ...
58 views

### How to efficiently apply LinearModelFit for each column in a matrix

I have a source vector and a matrix of targets that I want to fit a linear model for. What is a more "Mathematica" way of doing this?. Here is my code to do it for the first column in target ...
• 107
53 views

### Fitting parameter to match a dataset to another dataset

I am using a Module which calculates 3D-data based on 5 parameters and another input dataset. I'd like to fit the result of this modul to another set of data. Since my code became very long I will ...
1 vote
79 views

### Fitting an inverse power law [closed]

Is there any reasonably fast way of finding a function of the type that best fits a given data, for some K and n? For example, the following data closely follows an inverse power law ...
• 4,362
1 vote
177 views

### Fitting data with Arrhenius Equation

I have the following data: DataAZ400K = {{293, 1.98}, {313, 1.34}, {326, 1.58}, {344, 2.54}, {358, 3.8}, {373, 6.12}}; I want to fit this data with an ...
75 views

### Interpret P-value in ANOVA table and Parameter Table

I wonder how different between P-value in these 2 tables since they are not equal. I have check on Mathematica document. There is no information about these 2 tables in comparison.
72 views

### Problem with NMinimize and NonlinearModelFit

I have data points of some experiment and system of ODE, that approximate this data. ...
50 views

### NonLinearModelFit Usage Help

I am using FindFit to fit a piecewise linear interpolant (vs. x) to data (vs. t) using a convolution. The FindFit portion of my notebook is attached below. The fit appears to be reasonable despite ...
160 views

### Calculating derivative of experimental data (with noise) using tangent method

I have some experimental data and I need to do a derivative. I looked at various answers how to approach that at e.g. here. But I am not happy with them (the curve is not smooth as needed plus the ...
• 3,396
160 views

### Parametric curves from 2D data using DFT

There is a very cool application in maple for generating parametric Curves from 2-D Data using Discrete Fourier Transforms https://www.maplesoft.com/Applications/Detail.aspx?id=154546 I wonder if a ...
• 353