Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 62129

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

2 votes

Fitting of 2d data points with a function considering scaling, rotation and translation

First change the function combinedTransformation to combinedTransformation[{x_, y_}] = {sx (prx (-Cos[theta]) + prx + pry Sin[theta]) + psx (-sx) + psx + sx x Cos[theta] - sx y Sin[theta] + sx vecx …
Cesareo's user avatar
  • 4,013
3 votes
Accepted

Fit 3d data to a torus

Assuming that data is obtained from translated and/or rotated models Clear[a, c] p = {x, y, z}; P = {X, Y, Z}; Txyz = z^2 - a^2 + (c - (x^2 + y^2)^(1/2))^2 /. Thread[p -> RollPitchYawMatrix[{alpha, be …
Cesareo's user avatar
  • 4,013
1 vote

How to fit data to only half of a model

It seems that the best fit to pCD data is a gaussian bell as can be depicted. Hopelessly we don't have pCD data... pIDmm = {{1, 4.}, {2, 4.}, {3, 0.}, {4, 5.}, {5, 4.}, {6, 8.}, {7, 12.}, {8, 11.}, { …
Cesareo's user avatar
  • 4,013
0 votes

Solving ODE System and Estimating Parameters with Experimental Data

Using the language resources adata = {{0, 1}, {2, 0.88}, {6, .69}, {10, .53}, {20, .28}, {30, .15}, {50, .043}, {70, .012}, {90, 0}, {120, 0}, {150, 0}, {200, 0}}; bdata = {{0, 0}, {2, 0.12}, {6, .29 …
Cesareo's user avatar
  • 4,013
0 votes

ComplexFit fits only part of fit parameters

Fitting explicitly the real and imaginary parts. mx[fr_, s_, t_] := s/(1 + t^2 fr^2) my[fr_, s_, t_] := s t fr/(1 + t^2 fr^2) frk = Transpose[data][[1]]; zk = Transpose[data][[2]]; zkr = Re[zk]; zki = …
Cesareo's user avatar
  • 4,013
0 votes

Fitting data using a parametric differential equation

The modified script below doesn't gives formal errors but keeps a lot of time processing before outputting some messages now linked to numerical problems. eqns = {n'[t] == a L - b n[t]^2 - c n[t]^3 , …
Cesareo's user avatar
  • 4,013
4 votes

How to fit spline through points in $ \mathbb{R}^3$?

To eliminate noise in the data, it is best to perform a smoothing and not an interpolation. With the procedure that follows, three splines are adjusted one for each dimension, being that the degree of …
Cesareo's user avatar
  • 4,013
1 vote

Subtract peaks from curve

As a product of visual inspection, taking data from $\approx 80$ to $120$ and using the model $$ f(a,b,\sigma_1,\sigma_2,x_1,x_2,x)=a e^{-\left(\frac{x-x_1}{\sigma_1}\right)^2}+b e^{-\left(\frac{x-x_2 …
Cesareo's user avatar
  • 4,013
2 votes

Fitting for constants

This is an extension for the excellent answer from @Ulrich Neumann considering $$m\ddot x=-kx^{\alpha}-c\dot x-mg$$ instead of $$m\ddot x=-kx-c\dot x-mg$$ tx = Map[{#[[1]], #[[2]]/100} &, data] {tc, x …
Cesareo's user avatar
  • 4,013
3 votes
Accepted

How can I minimize a target function that has to solve differential equations numerically?

Clear[obj] data2 = {{{0, 0.2025}, {2, 0.76}, {3, 1.28}, {4, 2.2}, {5, 2.75}, {6, 2.95}, {6.5, 3.055}}, {{0, 441.337}, {2, 400.435}, {3, 300.326}, {4, 219.348}, {5, 120.109}, {6, 50}, {6.5, 25}}, {{0, …
Cesareo's user avatar
  • 4,013
3 votes
Accepted

FindFit problem, some models work -- and some do not

With xmin = Min@data[[All, 1]]; xmax = Max@data[[All, 1]]; ymin = Min@data[[All, 2]]; ymax = Max@data[[All, 2]]; After scaling datanew = Table[{(data[[i, 1]] - xmin)/(xmax - xmin), (data[[i, 2]] - ym …
Cesareo's user avatar
  • 4,013
2 votes

Determination of radius based on data points

A = Uncompress[FromCharacterCode[ Flatten[ImageData[Import["https://i.sstatic.net/s6rlR.png"], "Byte"]]]]; B = Uncompress[FromCharacterCode[ Flatten[ImageData[Import["https://i.sstatic.net/jylyd.pn …
Cesareo's user avatar
  • 4,013
3 votes
Accepted

Optimizing an ODE fitting algorithm with interpolated data

Another way to do the fitting. 1 - We will using a custom-made second order interpolation as giving in f[t]. … This facilitates an undesirable over-fitting. …
Cesareo's user avatar
  • 4,013
1 vote
Accepted

Fitting delay differential equations (DDE)

Introducing few modifications in the actual script, we found using MATHEMATICA version 12.0.0 running under Linux, Follows the script fitness[a00_?NumberQ, c00_?NumberQ, d00_?NumberQ, s0_?NumberQ, b …
Cesareo's user avatar
  • 4,013