Skip to main content

All Questions

Tagged with or
Filter by
Sorted by
Tagged with
1 vote
1 answer
164 views

Fitting smooth monotonic function (low number of points, irregular grid)

I want to fit data in the hope of obtaining an estimate for other data points (i.e. a good guess for the last 4 variables as a function of the first). Example data: ...
Kvothe's user avatar
  • 4,781
2 votes
1 answer
28 views

Fitting a free parameter by matching a an array with another array

I have the following problem that I can't figure out how to solve. I have two measured signals, (data1 and data1), and their measured sum (datasummeasured). I have a theoretical description of how the ...
Niky177's user avatar
  • 21
0 votes
1 answer
139 views

Using Manipulate for initial guess to nonlinear fitt, feed the result back to Manipulate (and repeat) for a general model with indexed parameters

I have been trying to put toghether a visual method to help fit experimental data with peaks. I have stumbled upon this answer which is very similar to where I got. But it is not sufficiently general ...
atapaka's user avatar
  • 4,036
1 vote
2 answers
143 views

Issues with Exp decay fitting using NonlinearModelFt

I am trying to fit a data set to an exponential decay function. The fit not only looks poor visually, but also the fitting parameters have high standard errors. It seems that the fit is getting stuck ...
user49535's user avatar
  • 1,225
0 votes
1 answer
90 views

Fitting data to peaks visually with manipulate - how to compactly implement for many peaks

I am trying to create a visual aid for peak fitting. There should be a background profile and on top, I want to place peaks. So far, I am stuck with the following issue. For simplicity, I am using a ...
atapaka's user avatar
  • 4,036
1 vote
1 answer
103 views

FitRegularization with a user function

I am trying to use FindFit with a user-defined function g[a] for FitRegularizaton as specified in the document. Say, I have parameters a1,a2,a3,a4 and define g[a] as ...
VladM's user avatar
  • 93
2 votes
0 answers
193 views

How to approximate an exponential series?

Consider the following expression $$ y_j= \sum_{k=0}^{L} \frac{e^{-\sum_{i=-k}^k(k-|i|)x_{j+i}}-e^{-\sum_{i=-k}^k(k+1-|i|)x_{j+i}}}{\sum_{i=-k}^k x_{j+i}}\tag{1} $$ for $1\leq j \leq L$. Given smooth ...
sam wolfe's user avatar
  • 4,953
3 votes
1 answer
344 views

SVD decomposition with optimization

Let's suppose there is a matrix A nxn, which will be decomposed into SVD: where ui and vi are singular vectors composing matrix U and V. sigma is a vector that contains the eigenvalues. In ...
Cairo Martins's user avatar
1 vote
2 answers
145 views

Parameter Estimation on ODE Using NMinimize (Least Squares Method)

I'm trying to estimate the parameters in this equation using this code: ...
Malanie's user avatar
  • 11
3 votes
1 answer
115 views

nonlinearfit with error message of "not valid" parameters

I am trying to fit a nonlinear function with four parameters to a dataset. It works, but standard errors are very high with the warning message "FittedModel::constr: The property values {...
user49535's user avatar
  • 1,225
0 votes
1 answer
153 views

Fitting data to a nonlinear model and avoiding warning

I have a complicated model and I want to fit it to my data. I used NonlinearModelFit. The fit quality is very poor (P is infinitesimal) and it comes with a warning ...
Yusra Zabarmawi's user avatar
1 vote
1 answer
261 views

Cannot solve a system of linear equations

I have four known functions, $u_i(x)$, and I suspect that all these four functions satisfy an operator, through a common force function, or at least a common force function type $(h(x)$, with some ...
Superunknown's user avatar
0 votes
1 answer
63 views

How to properly expand a list with certain numerical elements?

There is a list with 19 elements ...
Mam Mam's user avatar
  • 1,893
1 vote
1 answer
89 views

Fitting a dataset while keeping the risk of overfitting low

I have the following dataset: data = {{0, 1351.53}, {3, 1087.17}, {6, 1172.23}, {9, 1231.27}, {15, 1476.93}, {18, 1470.70}, {21, 1326.23}, {24, 316.80}} which ...
user avatar
0 votes
1 answer
79 views

Stability of linear fits

Let us consider the function $f(x)$ which has the expansion in fractional powers of $x$ near $x=0$ as shown below. ...
VladM's user avatar
  • 93
0 votes
1 answer
68 views

How can an explicit formula for the envelope to an oscillatory damped function be obained?

So I have the function ...
Luka Vilshansky's user avatar
7 votes
2 answers
407 views

Measurement error propagation onto fitting-parameters

I have a dataset consisting of (t,y) Tuples, where each y has a known measurement error (standard deviation). I would like to fit a trapaze-function into the data and obtain the fitting paramaters and ...
Julius Debus's user avatar
0 votes
0 answers
77 views

The method to use for MultiNonlinearModelFit

I need to fit a complex function $f(z)$ of the form f[z]=(p1[z]+p2[z]^(1/3)+p3[z]^(2/3))/(1+p5[z]^(5/6)+p6[z]^(19/6)) where all $p_i(z)$ are polynomials of degree ...
VladM's user avatar
  • 93
3 votes
2 answers
219 views

Fitting an exponential system

Consider the following system over a periodic array, where $1\leq j\leq n$, $$ y_j= \sum_{k=0}^m \frac{e^{-\sum_{|i|\leq k}(k-|i|)x_{j+i}}-e^{-\sum_{|i|\leq k}(k+1-|i|)x_{j+i}}}{\sum_{|i|\leq k} x_{j+...
sam wolfe's user avatar
  • 4,953
1 vote
1 answer
325 views

Forcing NonLinearModelFit to be positive

I've used the NonLinearModelFit function to get the fit for my data. I require the fit to to go through (0,0) (which I have ...
Schaef's user avatar
  • 173
1 vote
1 answer
158 views

Finding a suitable form factor for a given set of conditions

I have the following Mathematica code: ...
codebpr's user avatar
  • 2,953
0 votes
0 answers
73 views

Non-linear regression simulation

I have a sequence of data: data = {{20, 291}, {21, 440}, {22, 571}, {23, 830}, {24, 1287}, {25, 1975}, {26, 2744}, {27, 4515}, {28, 5974}, {29, 7711}}; The data is ...
yixjia's user avatar
  • 33
0 votes
2 answers
147 views

Plotting natural log equation in 3D plane

I have a natural log equation from excel and I need to plot it on 3D plane at a particular z(for example, z=1) I would expect a vertical plane, but what I am getting is a horizontal plane. This is ...
Seya's user avatar
  • 9
1 vote
1 answer
130 views

How to speedup calling the interpolation function? [duplicate]

Consider the following data: ...
John Taylor's user avatar
  • 5,963
0 votes
0 answers
71 views

Fit curve line doesn't extend over the correct domain

I'm trying to plot points as well as a non-linear fit function onto the same image. I used the command: ...
Punchinello's user avatar
3 votes
0 answers
48 views

Performing Tobit Regression in Mathematica by Maximum LogLikelihood

I am trying to estimate a tobit model by maximum likelihood method in Mathematica. I can not find the build-in function. So I try to perform it manually. Here is the log likelihood function of Tobit ...
Xiaoge Zhang's user avatar
0 votes
0 answers
59 views

Using FindFit for Approximation Fourier Series

I am expecting to have a list of discrete points, which I would like to approximate using Fourier's series, then plot Fourier series approximation alongside with discrete points, then plot terms of ...
Akhvlediani's user avatar
2 votes
1 answer
96 views

'NonlinearModelFit' for SIR ODE model, and adding a penalty function (soft constraint)

This is a modification of the question Is it normal that adding constraints on the parameters of NonlinearModelFit increases execution time 100 times?? I want a program that fits a SIR model to ...
florin's user avatar
  • 2,166
1 vote
1 answer
145 views

How to plot a curve with an experimental plot [closed]

There is an experimental curve in this paper : https://arxiv.org/pdf/1211.2616.pdf ( Fig. 21. ) I want to make a new plot of the experimental curve with my theoretical model curve. How to do so by ...
Dr. phy's user avatar
  • 303
3 votes
1 answer
146 views

Is it normal that adding constraints on the parameters of NonlinearModelFit increases execution time 100 times??

Normally, reducing the optimization domain by adding constraints should reduce the time of execution. In my case however, this puts the NonlinearModelFit in a coma. Without constraints, 8 seconds ...
florin's user avatar
  • 2,166
0 votes
1 answer
327 views

Can constraints on the parameters be imposed in NonlinearModelFit? [closed]

Hi I cannot figure out this from the documentation of this command. For example, take one of the examples in the documentation, where I also added initial guesses for the parameters. ...
florin's user avatar
  • 2,166
8 votes
2 answers
477 views

How to force fit of the data to exactly match one of its points?

Consider the following data: ...
John Taylor's user avatar
  • 5,963
0 votes
0 answers
108 views

Fitting NDSolve solution to data

I have a system of DDEs with 2 free parameters I solved with NDSolve, as you can see below ...
Giovanni Palermo's user avatar
1 vote
0 answers
78 views

Finding knot vector for Spline fitting

I have the following code from Mathematica: ...
Kerry 's user avatar
  • 45
0 votes
1 answer
116 views

How to find Specific Fit of a Distribution?

I want to fit a data set: ...
SAC's user avatar
  • 1,335
2 votes
1 answer
80 views

(Beginner question) How to solve large gradient region from experimental data?

I have a data like this. data ={100, 103, 101, 105, 100, 80, 83, 70, 71, 60, 40, 43, 20, 22, 10, 5, -1, -3, -2, 0, 1, 4, 3, 8, 7, 4, 3, 1, 0, 1, 2, 10, 5, 2} ...
rani's user avatar
  • 491
3 votes
1 answer
92 views

Nonlinear model Fit [closed]

I am trying to fit my data to the function: a + (b*(c/2)^2)/((T - d)^2 + (c/2)^2) I entered nlm = NonlinearModelFit[data, a + (b*(c/2)^2)/((T - d)^2 + (c/2)^2), {a, b, c, d}, T] However it returned [0....
Aice's user avatar
  • 33
2 votes
2 answers
142 views

Fourier series fit doesn't consider different local maxima of the data

I'm trying to appropriately fit a fourier model to experimental data. But the problem is that the resulting fit doesn't consider the varying local maxima of the data. Here's the data: ...
xPigeonDestroyer2000's user avatar
0 votes
0 answers
74 views

How to fit piecewise functions with unknown domain?

Thank you for your comments, I will discribe the question in more detail. I have a piecewise function as below and I'm looking for the parameters :...
ZZZ's user avatar
  • 1
0 votes
0 answers
125 views

Fitting a 2D elliptic paraboloid

I have a set of data as follows: ...
WaleeK's user avatar
  • 79
0 votes
2 answers
49 views

How to archive scatterplot with randomly jittered x-values for visualization purpose? [closed]

I want to fit my data or just plot a figure with randomly jittered x-values like this: Here I give an example: ...
Madun's user avatar
  • 38
11 votes
2 answers
330 views

Curve tracing for a given data set

I want to trace the curve for the given data set. This is my code ...
user444's user avatar
  • 2,730
2 votes
2 answers
132 views

How can I find an intermediate function between a set of functions?

I have 5 nonlinear functions, which are very complex and long. For this reason I will not include them here. But the plots of four of them are given here: I am looking for some functionality which ...
Superunknown's user avatar
1 vote
1 answer
207 views

Fitting data with results generated from a numerical model

I have system of 10 equations that I am solving to try and model some data collected. The model using the real world values doesn't produce the best result so I wanted to try and fit the model to the ...
D. Brown's user avatar
  • 324
7 votes
5 answers
407 views

How can we fit a closed curve?

...
MMA13's user avatar
  • 4,781
3 votes
1 answer
167 views

Arbitrary shape cut into triangles and packed into rectangle of the same area [duplicate]

I've been trying to code this idea in lots of different approaches but I've reached a wall here. Mathematica isn't my strong suit and I've been unable to find a solution to the RegionMeasure error. ...
Jonathan Vardy's user avatar
0 votes
1 answer
65 views

How to efficiently apply LinearModelFit for each column in a matrix

I have a source vector and a matrix of targets that I want to fit a linear model for. What is a more "Mathematica" way of doing this?. Here is my code to do it for the first column in target ...
Igor Binder's user avatar
0 votes
1 answer
121 views

Fitting parameter to match a dataset to another dataset

I am using a Module which calculates 3D-data based on 5 parameters and another input dataset. I'd like to fit the result of this modul to another set of data. Since my code became very long I will ...
rumpelstilzchen's user avatar
1 vote
1 answer
166 views

Fitting an inverse power law [closed]

Is there any reasonably fast way of finding a function of the type that best fits a given data, for some K and n? For example, the following data closely follows an inverse power law ...
sam wolfe's user avatar
  • 4,953
1 vote
1 answer
393 views

Fitting data with Arrhenius Equation

I have the following data: DataAZ400K = {{293, 1.98}, {313, 1.34}, {326, 1.58}, {344, 2.54}, {358, 3.8}, {373, 6.12}}; I want to fit this data with an ...
Indeterminate's user avatar

1 2
3
4 5
36