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

learn more… | top users | synonyms (1)

0
votes
1answer
47 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: ...
0
votes
0answers
21 views

Understanding the parameters required for Regression Analysis [on hold]

I have some data I would like to perform some regression analysis on so that I can create a formula to predict y given x. I ...
0
votes
0answers
38 views

Non-Linear Graph [on hold]

I'm trying to fit an Acos^2(theta) graph to the following data: {{295, 1.2}, {255, 1.4}, {235, 1.0}, {195, 0.2}, {155, 0.3}, {135, 0.7}, {95, 1.4}, {75, 1.4}, {45, 0.8}, {15, 0.2}, {15, ...
0
votes
1answer
107 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 ...
0
votes
0answers
32 views

How to make an equation to fit measured data [closed]

I want to make an equation based on my measurements and I have no idea where to start from. I have measured 3 parameters(x1,x2,x3) and calculated the 4th(y). How can I make an equation that can ...
1
vote
1answer
43 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
34 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 ...
3
votes
1answer
85 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
82 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 ...
11
votes
1answer
282 views

Fit two intersecting straight lines in Mathematica

I am trying to do a Kurie analysis of the double beta decay of Strontium-90. Here we have two straight sections, and I need to obtain a value for the intersection along with an error for it. I ...
7
votes
1answer
189 views

Fitting a numerical integral via NonLinearModelFit to magnetic data

I'm new to Mathematica and I'm currently trying to fit $$m_T (H,T) = N_T \int\limits_0^{\infty} \frac{x k_\text{B} T}{\mu_0 H} \mathcal{L}(x) \text{pdf}(D_\text{mag}) \text{d}D_\text{mag}$$ with ...
0
votes
0answers
25 views

fitting system of ODEs - “part2 of {} does not exist” errod

I'm trying to fit my data to a system of ODEs: x'[t]==a*x[t]+b*y[t] y'[t]==c*y[t]+d*x[t]+e*z[t] z'[t]==f*z[t]+g*y[t] having t,x[t],y[t],z[t]. I followed the code ...
1
vote
1answer
111 views

show fit information on plot

After performing a fit in Mathematica, I would like to show the fitted parameters in a box on the plot showing the fitted function. How would I go about achieving that? Here is a MWE: ...
0
votes
1answer
89 views

Fitting to a sigmoidal model

I am trying to fit a set of stochastic data to a sigmoidal function, but it's not working. Can you please help? Here is the function I am trying to fit to my data. ...
0
votes
1answer
99 views

Non-linear fit incorporating the error bar information

I make a non-linear fit to a data set. All my data have some error bars. Is it possible to do a fit to the data incorporating the error bar information? (I am not talking about the ...
1
vote
1answer
120 views

NonLinearFit with “complicated” integral model

I have a set of data $y_i (z_i)$ with errors $\Delta y_i$ ...
0
votes
1answer
46 views

Constraining some rows from LeastSquares to lines

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

Inconsistent DistributionFitTest results?

In pondering this question, I used Mariana's function to generate the following data. ...
1
vote
1answer
40 views
5
votes
2answers
467 views

What is the best distribution for my histogram?

I defined a security bound for a random walk (cube with 15 lengh) and i have this code to obtain a sample of the random times at which the random walk crosses the boundary for the first time: ...
14
votes
2answers
1k views

How to fit 3 data sets to a model of 4 differential equations?

I'm a biologist and a newbie in Mathematica. I want to fit three data sets to a model consisting of four differential equations and 10 parameters. I want to find the parameters best fitting to my ...
4
votes
1answer
178 views

Fitting triangular function with HeavisideTheta

I have a problem fitting a triangular function (like potential vs. time in cyclic voltammetry) with a HeavisideTheta function. I just want to get used to ...
2
votes
1answer
56 views

nonlinearnodelfit with a matrix as weights

I have to fit a non linear model to my data and I am trying to use nonlinearmodelfit. The problem is that I have systematic errors, so the ...
1
vote
1answer
46 views

FindFit (Jacobian Error) [duplicate]

I, like others before me, am struggling with FindFit. So, I tried a simple example. ...
-1
votes
1answer
40 views

How to fit one parametric array to another numerical array?

I have two arrays of length n. One of them is obtained by experiment, so every element of the array is a number. The other array is parametric, each element is a ...
5
votes
1answer
100 views

Why LinearModelFit is slower than NonlinearModelFit?

Why LinearModelFit is slower than NonlinearModelFit? ...
0
votes
0answers
41 views

Speeding up Nonlinearmodelfit by constraining parameters?

I have a complicated parametric PDE that can be fitted to some data with NonlinearModelFit, but takes several hours to estimate the best values of the four free parameters. Currently, the code ...
1
vote
1answer
138 views

dynamically set fit parameters and models with FindFit

I want to fit a gaussian profile by setting some values dynamically, but FindFit returns an error and i can't see the problem. with a given gaussian: ...
0
votes
1answer
76 views

Nonlinear fit with piecewise functions

I have an ensemble of data points $(x_i,y_i)$ and I need to fit them according to $y=F(a,b,x)$ if $x \leq x_{ref}$ and $y=G(c,d,x)$ if $x \geq x_{ref}$. The parameters I need to adjust are then ...
1
vote
1answer
81 views

Can ParametricNDsolve be used for coupled PDEs with 5 parameters?

I have a system of coupled PDEs with five parameters that I only know ranges for rather than explicit values, and I was wondering if I could define a parametric equation with ParametricNDSolve and ...
1
vote
1answer
90 views

Fitting data using a series of Sin and Cos

I have the following data representing the normal displacement caused by a normal load applied at the middle cross section of a cylinder: I've made the data available here. I am trying to fit ...
0
votes
0answers
49 views

Simultaneously fitting data sets with many variables as free parameters

I found a partial answer in the documentation centre, but would like to expand on it and know how can I fit multiple sets of data and extract the parameters from them. It is an eigenvalue problem - We ...
5
votes
1answer
152 views

Fit data with linear combinations of Cos and Sin

Recall that if $f$ is a piecewise continuous function on the interval $[-\pi, \pi]$, then the Fourier series of $f$ is $$f(x) = \sum_{n=0}^{\infty} (a_n \cos(nx) + b_n \sin(nx)).$$ See for example, ...
3
votes
1answer
261 views

NonlinearModelFit does not find a good fit

I am trying to fit my data to the following function, $$\frac{a b t \left(\log \left(\frac{-a d t+a t-1}{a d t}\right)-2\right)}{4 (a t-1)}-c$$ ...
1
vote
2answers
69 views

Minimizing the maximal residual in mathematica

With this: d1 = 10; d2 = 4; mat = RandomReal[{-1, 1}, {d1, d2}]; vec = RandomReal[{-1, 1}, d1]; LeastSquares[mat, vec] ...
0
votes
0answers
101 views

histogram fit for probability density

I am trying to fit the (probability density) histogram of some data with the exponential function, but I am having difficulties. My raw data are in file called ...
1
vote
2answers
136 views

FindFit giving weird values on a logistic equation

I was trying to fit a set of data onto a logistic equation, however it ended up telling me that the initial value when $t=0$ is greater than the maximum limit, thus I am led to believe that it isn't ...
16
votes
5answers
583 views

Finding the intersection of a curve with an interpolation function

There are no issues trying to find the intersection points of two defined curves. ...
11
votes
1answer
301 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 ...
2
votes
2answers
189 views

Line of best fit on LogLog plot

I have a LogLog plot, and i'm unsure about how to fit a line to it. The data represents a calibration curve. ...
0
votes
1answer
77 views

Replicating Excel output using Mathematica

I have 2 columns of data in Excel. One is inputs the other is outputs. I ask Excel to make a graph of that data and to fit the data to a power trendline. Excel does this and it's fine as far as it ...
1
vote
2answers
143 views

Can't find a fit for Erf

I have the following numbers ...
1
vote
2answers
77 views

How can I get a fully functional FittedModel when fitting data to a pointwise function?

When I am fitting data with a pointwise function using NonlinearModelFit, the produced FittedModel fails to calculate variances ...
0
votes
0answers
34 views

Supply parameter values in NormFunction of FindFit

As I understand the input to the NormFunction is a list of residuals. Is there a way to get parameter values into the NormFunction as well? I ran into a problem where the norm depends on the values of ...
18
votes
4answers
1k views

Mathematica envelope for the bottom of a plot, a generic function

I have the following set-up: xaxis = Table[x, {x, 0, 10, 0.01}]; yaxis = Table [Sin[x] + Abs[RandomReal[{-1, 1}]], {x, 0, 10, 0.01}]; ListLinePlot[Transpose[{ xaxis, yaxis}]] My ...
0
votes
2answers
110 views

Any other way to get a better FindFit for my data besides good initial parameters?

I fit some data with FindFit and NonlinearModelFit with some constraints and I am not getting a good fit with my data. I read ...
0
votes
0answers
48 views

Find Numerical Derivatives (With Errors) given some data

I have a question. Suposse I have some data with their respective errors: ...
3
votes
2answers
131 views

Multi-Fitting with Nonlinear model

I want to fit experimental data by the H-N model. Here is the H-N model: $$\text{EHN}(T)\text{=}\text{E$\infty $}+\frac{\text{E0}-\text{E$\infty $}}{\left(1+\left(i \omega\tau(T_g)10^{-\frac{\text{C1} ...
7
votes
1answer
132 views

Least Square Data Fit /Design Matrix

I am trying to learn how to use the DesignMatrix function in Mathematica and how to perform a LeastSquares fit. I am at end of ...
1
vote
0answers
127 views

Non linear model fit mathematica

I want to fit experimental data (temp,alpha) to the following equation for calculating k and Ea -Log[alpha]^n = function(k,Ea,temp) However i do not know ...