Tagged Questions

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

124 views

NonlinearModelFit::nrnum error [closed]

I'm trying to fit data (including some small negative numbers at both extremes) to a normal distribution. ...
74 views

Pulling variable out of NonlinearModelFit [closed]

I have a fit, Dynamic[f1 = NonlinearModelFit[d1, a Exp[-(b (x - c1))^2] + yoff, {a, b}, x]] Where I need to be able to access ...
786 views

Gauss Fit to List of 2D Points

I've been trying to find a solution to what I think is a common problem. I have a list of Data like ...
196 views

FindFormula can't deal with the population data from Wolfram server

Bug introduced in 10.2 and fixed in 10.3 In the documentation of FindFormula, the first application of it is to predict the population of Poland. ...
74 views

Modify measured values to improve NonlinearModelFit results

Problem: Measured data points have a random distribution of DC offsets (either +/- 0.65 mV), that came from an incorrect setting on the 24-bit ADC we were using. Essentially for each measured voltage ...
118 views

Problem fitting when some data is missing

I have a problem fitting a function to data, where I only have the falling and rising edges of the data, with the peak having been capped and was wondering if you have some tips. The data should have ...
843 views

What is behind experimental function: FindFormula?

In version 10.2 there is a new experimental function: FindFormula[]. I suspect that a genetic programming algorithm (symbolic regression) is behind this new ...
101 views

How to find the best fit for given input data? [closed]

I have the following data: ...
115 views

I'm in a little over my head here and I'm fully aware of it, so I'm hoping for some help. I've been assigned to a project where I am given data: http://www.pastebin.ca/3061136 (Example Data) I ...
405 views

Fitting and plotting Weibull distribution

How can I find the best fitted 2-parameter Weibull's distribution (PDF) to describe my data? How can i plot my data and estimated distribution all in one graph? How can I show/compare results of ...
96 views

Using FindFit for a non-trivial complex function [duplicate]

I have data set which I would like to fit to the function $\quad \quad f(r) = A\cos(kr - \pi/4 + \phi_1)\times\exp(i(-2\log(r) + \phi_2))$, where $k$ is a constant I know and $(A,\phi_1,\phi_2)$ are ...
264 views

Fit model with two dependent variables

Say I have an experiment that produces two values, for a given input. For example you get a complex response value. Now I have a model that - of course - also produces two dependent values for one ...
199 views

Curve fitting data I imported from excel [closed]

This is my first time posting here, so sorry if I break any rules. There is this excel document from which I imported two columns of data to mathematica. I need to fit the data into a curve so that ...
57 views

Mapping Linear Model Fit Over An Arbitrary Number of sets

I have multiple sets of data, and I want to apply Linear Model Fit sequentially to each set of data. For example, below tstlst contains 3 data sets. Right now I ...
1k views

Fitting - Exponential

I'm trying to fit the following data using Mathematica, but unfortunately im not getting any decent results. ...
109 views

TargetFunctions option in FindDistribution yields error

I have some data set that I am trying to find the maximums . I figured I could do this by fitting the many peaks of the dataset to Gaussian distributions and then finding the peaks of this data from ...
266 views

Solution to heat equation with Neumann boundary conditions and lateral heat loss

I am conducting an experiment on heat conduction in a copper rod. To do so I am using a thin copper rod with several temperature probes, then I am going to compare the data with a solution to the heat ...
543 views

Find a Fourier series from discrete data

I am trying to fit a Fourier cosine series to discrete data. I read through this, but I was not able to understand it. The data should be periodic with a period of $0.2 \text{ m}$, and it is the ...
202 views

NonlinearModelFit errors and precision

For this problem, I use a data set, which I've made available here. ...
174 views

Non Linear Model Fit (Division by Zero Error Message)

Can someone please tell me why this expression returns error messages about division by zero. ...
77 views

What is the role of the pattern object in this implementation?

In the documentation I found a nice idiom which allows me to do model fitting with interpolating functions. I think this kind of thing is amazing and a credit to the utility of an environment like ...
109 views

...
115 views

P-Values are inconsistent when using DistributionFitTest repeatedly

I am attempting to become more familiar with the DistributionFitTest, specifically the distributions it yields and their fittedness. What I have found is that when I generate random data, fit it, and ...
131 views

Substituting ParametricNDSolve for NDSolve

This is my first post so let me know if I need to format things differently. I have been using NDSolve for most problems which optimize parameters for ODEs. I believe that ParametricNDSolve would be ...
111 views

Plotting data after fitting it to exponential function [closed]

I am trying to plot h vs t such that h fits a equation ...
402 views

Fitting data to a complicated function

So, where to begin. I have a certain dataset that I want to fit to a function. However, the function is rather complicated (matrix inversions, linearsolve) and does in general not have a closed form ...
116 views

Precision of LinearModelFit with Polynomials

I have a Problem regarding the fit of given points with a polynomial up to the fifth degree. tableofvalues=Import["tableofvalues.csv"] My polynomial is: ...
82 views

Trouble fitting with NonlinearModelFit

I'am having a bit of a headache comparing the results from the NonlinearModelFit to a particular dataset. I have the following dataset, ...
340 views

Find the best fitting function for some experimental data

I am almost new in Mathematica, and so I have some problems that may appear basic for you. I am given a set of data taken from an experiment. I am supposed to find the curve that best fits them. The ...
161 views

Find fit does not find the best fit

Here is my data ...
95 views

How to make a twice-differentiable function that approximates some data?

I have some time series data that I would like to approximate with a twice-differentiable function. Each time series has ~10,000 datapoints, so I definitely do not want a function that passes through ...
161 views

Fit linear data with weights for y and x in LinearModelFit

I am quite new using Mathematica, I hope someone could give me some help. I have a set of {x, y} data and I have a list of {deltaX, deltaY} standard deviation. I would like to fit my data taking into ...
88 views

Apply NonlinearModelFit to an image

I have several images (in FITS format), which I want to fit with a 2D-Gaussian distribution. The problem is that NonlinearModelFit expects data in the form of a ...
125 views

FindDistributionParameters gives an error for a mixture of user defined sinh-arcsinh distributions

I have some data (1593 values). I first binned it using the Knuth rule and fitted a function that is a linear combination of two sinh-arcsinh functions. I then ...
350 views

ODE fitting to dataset

So, I have a ODE system, it is a complex biochemical kinetic mechanism with six species changing over time. ...
409 views

Fitting data to plot using errors as weights [closed]

I have some enzyme kinetics data that I want to fit to the Michaelis-Menten curve in order to obtain the kinetic parameters of the enzyme. Is it meaningful, statistically and functionally speaking, ...
295 views

Intersection of a ListPlot3D surface with a plane

I'm trying to use Mathematica to analyze some physics data from an experiment, more precisely, I have to fit a 2D data series with a one dimension function. At the moment I'm able to load and plot ...
169 views

non linear Least Squares with model function given by ODE's

I have to fit to experimental data a model function given by a linear combination of functions y1(t) and y2(t) a1*y1(t) + a2*y2(t) with a1 and a2 ...
126 views

How can I plot more regression trend line in the same graph?

I would like to do something like the example I drawed manually: ...
106 views

Traffic growth forecast: showing the change of linear regression

The following picture shows a changement in the trend of data. (The data used are available here). Is there any tool that can show this change of trend? Until now I managed to show even more ...
352 views

TimeSeriesModelFit incorrect?

I am trying to determine the optimal model for time series data (1592 observations). When I run TimeSeriesModelFit, Mathematica selects $AR(1)$ model, the estimated ...
359 views

How to Fit experimental data with 4D ParametricNDSolve?

Let me first explain the background problem. I'm trying to solve a problem with a projectile motion in 4D such that the position vector is: $\boldsymbol{r}(t)=\boldsymbol{r}[x(t),y(t),z(t)]$ I have ...
176 views

Custom Methods for NMinimize/NonLinearModelFit

Is there a way to write custom methods for NonLinearModelFit or NMinimize? To give background, I currently have a batch of code ...
313 views

NonlinearModelFit and plot with multiple parameters function

i ve got quite simple function: $f(t) = x1 * a(t) + x2 * b(t)$ and table of results like this one: t | f(t) | a(t) | b(t) ---------------------- 1 | 2 | 5 | 3 ---------------------- 2 | 4 ...
83 views

Fitting a vector-valued model using Mathematica [closed]

I'm wondering if there is a way within Mathematica to perform some kind of parameter fitting on a vector-valued model function (in this case a model of electric field vectors). Essentially what I want ...
153 views

How to do linear fit for 2D data points [closed]

I am very much new to Mathematica, and facing several difficulties. I used the following code Fit[{2, 4, 6, 8}, {1, x}, x] The output is ...
128 views

Computing a Gamma function-Gaussian integral

I would like to compute the following function: Integrate[Gamma[k,0,Exp[-2 e x^2]],x] k is an integer and ...
168 views

How can I use NonlinearModelFit with multiple variables? [closed]

I am trying to find the coefficients for following equation: $\quad \quad f(x,\,y,\,z) = a (x^2)\, exp(b x + y^2) + c z^2 y$ using NonlinearModelFit. But I can't ...