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

learn more… | top users | synonyms (1)

0
votes
1answer
91 views

Constraining some rows from LeastSquares to lines

For two matrices, A and B, with dimensions {n,p} and ...
0
votes
1answer
91 views

Making a fit to my empirical data [on hold]

I want of plot the fit for the graph The Data for this graph is ...
4
votes
0answers
145 views

Problems extending NelderMeadMinimize into 2D

I've been playing around with Oleksandr's compiled Nelder-Mead Minimization function presented here: Shaving the last 50 ms off NMinimize First, I'll create some sample data. This creates a noisy ...
0
votes
0answers
50 views

No real number fitting double exponential in Mathematica

I am trying to fit a double exponential curve to my data, but I got the error saying there are non real number. Also I tried with starting values for my 4 parameters, but this does not work either. ...
2
votes
3answers
90 views

Plot least squares curve on Linear Log Plot

I have the following Data: ...
2
votes
0answers
39 views

Why do EstimatedDistribution and DistributionFitTest work this way

I am fitting some time-series data to both a stable distribution and a normal distribution in order to assess the goodness of fit of each. Along the way I encountered the following confusing result. ...
3
votes
3answers
129 views

Fitting the Plot by fourier Series of either sine or cosine

I have list of data and its plot and I don't know how to fit the plot with fourier series of either sine or cosine. Full Data: ...
0
votes
1answer
42 views

What is the definition of FitResiduals

What is the definition of FitResiduals in Mathematica? I could not find its definition in the Mathematica help. Is it the same as chi squared?
0
votes
1answer
56 views

Logarithmic curve fit in data

I have the following data which are the theoretical: ...
7
votes
2answers
217 views

Does FindFit support complex numbers or doesn't it?

Inspired by this previous question: Findfit doesn't give the good fit; Changing the starting values will not change the results. Consider the following complex-valued dataset. ...
1
vote
3answers
115 views

Why does FindFit seem to have trouble fitting exponential data?

I have 4 data points. t is in minutes, and y is radioactive counts per minute. When I input the following lines: ...
2
votes
1answer
56 views

Piecewise conditions with a parametric PDE

I'm using ParametricNDsolve to check best fit of a model (function Eb1) with some data, and I have four free parameters I want to test. I can easily construct a Parametric solution between the two ...
0
votes
1answer
78 views

Fitting data to a Poisson distribution

I'm trying to fit a Poisson Distribution to data produced in a lab. I've successfully made a Histogram of the data, which looks like: However, when I try to fit the Poisson Distribution using: ...
1
vote
2answers
46 views

FindFit is producing a list of imaginary numbers when there is non

I am trying to find the fit of an equation to some data and mathematica thinks there is a list of imaginary values. My data is all real positive number. ...
0
votes
0answers
52 views

Horizontal shift in fitting data by a sinusoidal nonlinear model

I have data that can apparently be fitted by a sinusoidal function in form $D+A\sin(B(x-\frac CB))$. I tried doing the best fit in Mathematica using ...
0
votes
2answers
105 views

Error function fit of data

I have this experimental data set which I know should follow the Complementary error function. My goal is to find the σ of the associated gaussian distribution. However, I cannot seem to do it in ...
1
vote
3answers
197 views

To obtain an equation for a given curve

I have obtained the graph, I would like to know its equation. The graph seems to be a hyperbolic spiral which, its equation reads, $r = a/\theta$. I read here and also, but these are concerning the ...
2
votes
2answers
689 views

Find a best fitting curve for some data with no regular pattern

Suppose some data with no regular pattern is given, so common patterns of functions all fail to fit it. Then how can one find the best fitting curve? I believe there will be some data for which we can ...
0
votes
0answers
35 views

How do I constrain the result of fitting my non-linear model to be greater then 0

fitresulty21 = NonlinearModelFit[ydata21, {funfit[y, σ, A, B, x1, d, d/2], A > 0}, {{x1, 20}, {σ, 3}, {A, 200}, {B, 2000}, {d, 110}}, y]; ...
1
vote
0answers
32 views

Fitting a line without constant term with LinearModelFit [closed]

From the Documentation for LinearModelFit: LinearModelFit[{y1,y2,...}, {f1,f2,...}, x] constructs a linear model of the ...
3
votes
2answers
173 views

In a ListPlot of LinearModelFit, plot error band

This is similar to this question. The fitted line can be plotted alongside with the data with this code: Show[ListPlot[data], Plot[lm[x], {x, 0, 5}]] I would ...
0
votes
1answer
198 views

Obtaining the envelope of an oscillating function and perform fitting

There is an elegant way to obtain the envelope of an oscillation function explained here http://mathematica.stackexchange.com/a/27854/15966 My question is how to modify the code below so I can fit ...
0
votes
1answer
168 views

Exporting tables of interpolating functions

A few weeks ago I asked a question about manipulating parameters in NDSolve (Looping with NDSolve?) , and received some very helpful advice about the manipulate environment; now I want to take the ...
2
votes
2answers
117 views

Fitting a variable using multiple equations

I would like to find the best fit of two variables for a number of approximate equations, such as: 1x+2y+2=7.04 2x+y+4=7.98 1.5x+1.5y-2=2.53 1.8x+3y-1=6.77 That ...
5
votes
3answers
170 views
0
votes
0answers
27 views

Fix Parameters for NonLinearModelFit?

Is it possible to fix the parameters for NonLinearModelFit within the function itself instead of defining the fix parameters at the beginning of the notebook? I am ...
2
votes
1answer
54 views

Trouble with using a log10 function in NonlinearModelFit

I was wondering why won't mathematica give a result where the function is also Log10, instead it gives the ordinary Log. Is it ...
1
vote
0answers
35 views
0
votes
1answer
73 views

Find polynomial equation for set of 3D data

data was given in columns in the order {y, x, z}, with y dependent on x, z ...
5
votes
0answers
66 views

Third syntax version of LogitModelFit: unexpected result of “BestFit”

The third listed syntax version of LogitModelFit allows one to specify input in a simple way: Only a design matrix (with a row of values of the explanatory input ...
0
votes
1answer
77 views

How do I fit NDSolve result to experimental data? [duplicate]

I have two coupled ordinary differential equations which I solve numerically in Mathematica, but now I want to fit the solution with experimental data. I do following, (the experimental data ...
0
votes
0answers
31 views

Data Fitting with xerrors and yerrors using findfit [duplicate]

I'm trying to fit data with xerror and yerror using "Findfit", so i'm trying the same form than in tuto : ...
0
votes
1answer
113 views

Discrete peaks to curve via Voigt summation

I have two data sets. One is an experimental recording of an absorption spectrum, composed of regularly spaced (wavenumber, intensity) coordinates with a fine wavenumber resolution, thus making ...
1
vote
1answer
115 views

Fitting Function with 3 parameters

I am trying to fit a function with 3 parameters however the result strongly depend on the initial values of parameters: ...
0
votes
0answers
34 views

Fitting for multiple data in Mathematica [duplicate]

I've just started to use Mathematica for programming and I was wondering how I could do Fitting for several data sets. For example, I have one curve. For this curve I need to plot a fit curve, if my ...
0
votes
0answers
38 views

How to approximate a computationally expensive 5-dimensional manifold?

I have a 4-parameter family of functions, which I'll refer to as y[a, b, c, d][x]. In this notation, a, b, c, d are the 4 ...
3
votes
0answers
108 views

Module in numerical model for NonlinearModelFit is slow and leaks memory

I am trying to make a NonlinearModelFit where the model is the result of a numerical calculation. My code works, but it is very slow and also seems to have a memory ...
10
votes
3answers
275 views

Disentangling the data

An experiment yields a functional dependence on two variables $F(x,y)$, can be imagined as a 2D map. It is known that the function can be factored as follows $F(x,y)=fx(x) gy(y) +gx(x) fy(y)$. Given ...
2
votes
1answer
191 views

Model fitting to noisy data with a custom minimization function

I'm looking into fitting some data with Mathematica. I've got my head around how NonlinearModelFit works (I've been using the Levenberg-Marquardt algorithm for some ...
0
votes
2answers
115 views

Least Square Fitting

stuck on a mathematica assignment and could really use some help. A) Fit a function with the shape log(Y) = a0 + a1log(U) to the datapoints (log(Ui), log(Yi) with an least square fitting. Show this ...
1
vote
1answer
55 views

Inaccuracy of Piecewise function? [duplicate]

I have the following issue and can't find a solution so far. ...
0
votes
1answer
69 views

Trouble fitting an explicitly complex model with the TransformedFit package

This is follow up from a previous question in which @Oleksandr R. suggested the use of a package he developed for splitting a model and data into real and imaginary parts to avoid a problem with ...
0
votes
1answer
76 views

NMinimize holding problem

I have a function that I want to minimize numerically through an NMinimize command (because it's very complicated analytically). The minimizer call looks as follows: ...
1
vote
1answer
63 views

Multiple Linear Regression - obtaining equation with constant term

I am trying to use the LinearModelFit function to obtain a linear regression of my 5 inputs for my single output. I have the input data: ...
0
votes
0answers
42 views

Fitting data involving units

I want to fit some data to a model. However, if the data involves units in the independent variable, fitting seems not to work. As an example, consider the code ...
4
votes
1answer
170 views

Fitting piecewise functions

I have several large data sets which follow the following pattern: A position is measured, a force is applied until a new equilibrium is found. I'd like to find a fit for the position, at least at the ...
1
vote
2answers
112 views

How to fit exponential function which is not converging

I performed an experiment where I measured diffusion in a lipid bilayer. I performed the measurement by fluorescently labeling some molecules in the bilayer, and the irradiating them with light ...