# Questions tagged [fitting]

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

1,453 questions
Filter by
Sorted by
Tagged with
186 views
+100

### Histogram (automatic binning)

There are different methods for choosing widths of bins for a histogram, like Freedman-Diaconis rule. In Mathematica, without choosing a specific method, with the command ...
54 views

### convert a parametric function into a parametric polynomial [closed]

As shown in the image, I want to convert the functions Y1 and Y2 into polynomials. These functions are only dependent on X. Like the Taylor series In the Taylor series, it converts a function into a ...
320 views

### Fitting an exponential model: Mathematica vs. Excel [closed]

My data is: data = {{0, 0.05}, {40, 0.079}, {80, 0.113}, {120, 0.18}, {160, 0.31}, {200, 0.5}, {240, 0.71}, {280,0.86}, {320, 1.02}}; With Excel we can fit the ...
66 views

### How to find the integrand by fitting data - spectrum reconstruction

Problem statement I have some experimental data of measurement values vs. temperature. Now, I want to find the spectrum which causes the measured temperature dependence. The measurement values are the ...
40 views

### Fit data over interval of a function [closed]

I want to fit a function but just over an specific interval, so I can extract the best fit value. My whole data set does not resemble any function at all, but just a section of it. Here is how my data ...
43 views

### MaxStepSize for NonlinearModelFit?

Is there a way to restrict the step size used in NonlinearModelFit? In our applied problem, NonlinearModelFit, at the first ...
90 views

### How do I apply FindFit to data describing a spiral?

I have a list of numbers that, taken in order, describe a spiral in the complex plane. Here is a small subset of it, sufficient to illustrate the problem: ...
46 views

### Find fit for 3D data

Consider some dataset in the form {x,y,data[x,y]}: ...
50 views

### LinearModelFit returns a large error for x^2

I have the following list of {x,y} measurements: ...
91 views

Consider the following dataset: ...
81 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 ...
62 views

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

I have these two data sets: ...
189 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: ...
33 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): ...
70 views

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

Hi. I'm trying to figure out how to code Simpson's rule in mathematica.
42 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

### 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. ...
139 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 ...
91 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, ...
65 views

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

This code works: ...
68 views

### Drawing a straight line in complex plane

I have these point ...
64 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 ...
58 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[ ] ...
237 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 ...
270 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. ...
32 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 ...
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. ...
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,...
105 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 ...
59 views

### How to show all global minimizers?

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(\...
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
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 ...
34 views

### How to fit an exponential decay on a loglog plot

I have the follow dataset: ...
82 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. ...
58 views

### 'FindFit' ignoring certain data points to optimise r^2 value

As shown in the code below, ...
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: ...
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? <...
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 ...
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: ...
33 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 ...
62 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: ...
24 views

### NArgMin with Root functions

I'm trying to minimize an error function sumt to find some parameters S, s0, si : ...
31 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 ...
151 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 ...