# Questions tagged [fitting]

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

1,445 questions
Filter by
Sorted by
Tagged with
67 views

### How to fit my data to error function?

I asked this question yesterday about fitting my data to logistic function and I received the right answer, but now I have to fit my data ...
57 views

### How fit my data to a logistic function? [closed]

I have these two data sets: ...
181 views

### How to Fit This Chemical Experiment Data with such a Complicated Theoretical Model?

I am fitting data on an experiment of potentiometric titration that uses alkali to titrate weak acid in analytical chemistry. Here is the data: ...
303 views

### Convolve and fitting

I want to convolve two equation, then I want to find the parameters. But it doesn't give the answer and Takes too much time. What is the wrong with my code? ...
30 views

### Linear regression: confidence interval of the average of 10 slopes, error of propagation and error of the mean [closed]

I have 10 regression slopes in one group, each slope has its associated standard error. Now I want to find the average slope of this group and the associated standard error which will be used to find ...
30 views

### Simplify function to find rate constants

I have a function to calculate rate constants using nonlinear least square modeling from a 2011 paper by Jia et al. https://www.cell.com/cell/fulltext/S0092-8674(11)00536-8?_returnURL=https%3A%2F%...
90 views

### Fitting data to equation with one fitting parameter

If I have the following data (x value is composition and y value is temperature): ...
124 views

### Find a “ridge line” from a set of irregularly spaced points

I'm solvind a slope stability problem whith the finite element method. As an output I get the square root of the second deviatoric invariant of the plastic deformation, which indicates the failure ...
64 views

### Simpson's 1/3 Rule [closed]

Hi. I'm trying to figure out how to code Simpson's rule in mathematica.
83 views

### Exponential Decay fit and printed parameters with integer data [closed]

Problem: I'm trying to plot an exponential decay curve on a set of integer data, and print the various parameters and their uncertainties on the plot itself. Having adapted code from another question, ...
62 views

### Fittind data with shifted Chebyshev polynomials

I am trying to fit data from a simulation to a particular class of polynomials, according to least squares approach. ...
40 views

### NonlinearModelFit a custom function - getting wrong fit parameters and huge std

Im trying to Fit some measured Data, but the fitted parameters which the FindFit[] Ffunction is returning are completly off. I have the following Data depending on the Temperature ...
63 views

### How to avoid one-hot encoding for LinearModelFit and NonlinearModelFit

This code works: ...
66 views

### Drawing a straight line in complex plane

I have these point ...
61 views

### How does NonlinearModelFit work? [closed]

Suppose I have a model $f (x)$ with some free parameters $a, b$ and I want to fit my model to a data set called Dx. How does NonlinearModelFit find the value of ...
57 views

### Best fit curve for a list of data

I am kinda new to Mathematica and I have some basic questions. I need to find the best fit curve for a set of data. Here's the data: ...
27 views

### NMinimize sum of several fitted results

I have 10 data sets and assume them a same parameter, offset in the CorrelationFit function. I would like to minimize the ...
29 views

### How to convert element's Table to List / Array to make an independent multivariable fit?

I would like to make an independent multivariable fit, but I have problems using a Table that I generated. I can´t use their elements because it isn´t in a list or a rectangular array. Using Table[ ] ...
234 views

### Fit ellipse to a arbitrary 2D image to extract centroid, orientation, major, minor axis

I am wondering if there is an easy way to fit an ellipse into an arbitrary 2D image quickly, so its centroid, orientation, major, and minor axis length can directly be extracted. In MATLAB, this can ...
266 views

### How to fit a curve in a picture with an equation?

For a curve taken from a picture, is there any method to fit it with an equation if it appears to be some standard curve? For example, in the following picture, the curve looks like an ellipse or a ...
57 views

### fitting the dataset with a model equation

I have a dataset. ...
31 views

### How to evaluate fit at a fixed point

How can I evaluate the result of Fit applied to the data used in the example code below ...
75 views

### Plot Styling Errors (PlotLabel, PlotTheme, Inset not appearing)

Question: I'm trying to pull together a graph with labelled axes, a title, and an inset box with information relating to the plot such as the y-intercept (A in this code) and it's uncertainty. However,...
1k views

### Does anyone have experience with performing symbolic regression using Mathematica?

I understand that there is at least one Mathematica package, DataModeler commercially available for symbolic regression. I'm seeking any observations with this or any other similar tool. I'm ...
24 views

### ParameterTable from NonlinearModelFit returns error messages

I am doing some nonlinear regression using NonlinearModelFit function. Here in the code I am currently working on. ...
84 views

### How to fit the solution of a NSolve with a NDSolve embedded

I have a system : $$s'(t)=A n+B a(t)\\a'(t)=C s(t)$$ Then I define the function $\tau(n)$ as the solution of the equation : $$a(\tau(n))n=1$$ and I'm looking for the parameters $A,B,C$ with a fit. ...
83 views

### Error in nonlinearmodel fit for a function with Definite Integral and complex number

I am trying to fit a function and Here is the code which I am trying, Please find the data here dataset ...
102 views

### Finding Chi^2 of a Non-Linear Fit Model

Question: I have some data, with a y=Ae^(-kt) model applied (It's a radioactive decay), thanks to answers on another question, the model is applied and returns the ...
148 views

### Applying an exponential decay fit with uncertainties

I have some data from a radioactive decay experiment that I'm trying to fit an exponential decay curve on that will take account of the uncertainties on the data, and then ideally return the data for ...
91 views

### Mathematica Linear Regression [closed]

How do I create a user-defined function for linear regression without using the built in function. Essentially doing the steps one by one
This is a follow-up to this question and I'm aware of this question for the local minimizers case. Consider, for $0\leq \epsilon\leq 1$ and $0<q,p<1$, the function \begin{align} f(\... 0answers 74 views ### Finding multiple minimizers Is it possible to find all (or as many as possible) minimizers of a given function? For example, minimizing the function \cos(\pi(p-q))+\cos(\pi(q+p)) for -3\leq p,q\leq 3  can be done using ... 1answer 33 views ### How to fit an exponential decay on a loglog plot I have the follow dataset: ... 1answer 78 views ### Limit variable in NonLinearModel Fit to a list I'm attempting to constrain the values of some of the model fit variables to a list of defined numbers. Here are a sample dataset and model. ... 1answer 56 views ### 'FindFit' ignoring certain data points to optimise r^2 value As shown in the code below, ... 1answer 56 views ### Regression of a set of (2-element) vectors on another set of (2-element) vectors As a trivial example, here are two vectors: f = {{1, 1}, {2, 2}, {3, 3}, {4, 4}} s = {{-1, 2}, {-2, 4}, {-3, 6}, {-4, 8}} It is instantly clear (apart from my ... 0answers 26 views ### Multivariate AR process model fit Is there a function in Mathematica that allows me to fit a VAR model with 4 variables? Let's say I have the following simulated data: ... 1answer 40 views ### Confidence interval for variance in fit When using (Non)LinearModelFit you can get estimates for all parameters and for the variance of the fit and confidence intervals for parameters, but what about a confidence interval for the variance? <... 0answers 67 views ### How do I remove a singularity that appears when I make a fit to my data? I am trying to fit a complex algebraic function to a data set Data, which is basically a Lorentzian. The problem I am facing that while fitting there exists an infinity. Could you help me to get rid ... 0answers 31 views ### Fitting nonlinear model to intensity plot with Gaussian weights? I am trying to fit my model \omega(\vec{k}) to the following experimental data to extract three parameters J_x, J_y, and J_z. The data that I am trying to fit to is: ... 0answers 32 views ### Nonlinear model fitting constraint problem I have been having a great deal of difficulty understanding how to properly use the "NonlinearModelFit" functionality in Mathematica. I have scoured the documentation and online videos ... 0answers 56 views ### Constraint of a variable with an expression in nonlinear model fitting - independent variable constraint? I am attempting to fit a set of experimental binding data: ... 4answers 168 views ### How to fit data to only half of a model ... 0answers 24 views ### NArgMin with Root functions I'm trying to minimize an error function sumt to find some parameters S, s0, si : ... 0answers 30 views ### Removing Irregular Transient Spike from Linear data trend The x-y data that is being analyzed generates a linear relationship (y=mx+b) when in steady-state flow. NON-REGULAR transients are often introduced into the system. These transients prevent the ... 0answers 38 views ### Fit data to a model of two-variable differential equations I am trying to fit some data to the solution of a differential equation. I am using ParametricNDSolve to create a model which should fit the data using ... 0answers 78 views ### NonlinearModelFit with two-dimensional input to two-dimensional output I want to estimate a nonlinear mapping from two-dimensional input positions to two-dimensional output positions. (Think of this as a nonlinear distortion of an image. Once I get the estimated ... 3answers 4k views ### Finding distribution parameters of a gaussian mixture distribution Short version: how to estimate the parameters of a mixture of multivariate normal distributions (i.e.: Gaussian mixture model)? Long version. I am trying to estimate the parameters of a mixture of ... 1answer 104 views ### How can I minimize a target function that has to solve differential equations numerically? My problem is to minimize a target function with differential equations in it. The target function is\min \mathrm{J}\left( p \right) =\sum_{i=1}^5{|x_i\left( p \right) -y_i|}, where $x_i(p)$ are ...
I am trying to fit a model to an intensity map to extract three values for the parameters of my model $J_x, J_y, J_z$. Currently, I am running into the issue where I can extract values for these three ...