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 144

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

9 votes

Fitting fractional complex data with NonlinearModelfit

allows you to set how the residuals are compared to each other: FindFit[set, 1/(a + b*x^2*I), {a, b}, x, NormFunction -> (Norm[Abs[#], 2] &)] If this isn't what you want, you can probably build a fitting
Searke's user avatar
  • 4,469
5 votes

Unexpected differences with various uses of NormFunction

Compare your results to: FindFit[{1, 3, 9, 20}, x^n, n, x, NormFunction :> ((Norm[#, thisisnotavariable]) &)] When the NormFunction fails and is not well designed, FindFit just quietly chooses the …
Searke's user avatar
  • 4,469
3 votes

How to plot Fit functions?

An example: data = {{0, 1}, {1, 0}, {3, 2}, {5, 4}} f[x_] = Fit[data, {1, x}, x] Plot[f[x], {x, 0, 10}] Please note that I used = instead of :=. The right hand side needs to evaluate before being …
Searke's user avatar
  • 4,469
10 votes

Output of NonlinearModelFit differs from the correct result

You will want to run: FindFit[data, b*t^a, {a, b}, t, NormFunction -> (Norm[#, 1] &)] {a -> 0.66955, b -> 1.20678} Normally in statistics you try to reduce the 2-Norm. In some cases however you wa …
Searke's user avatar
  • 4,469
13 votes

Fitting Stradivari's scroll

I didn't get a good answer, but this is how I would do it and probably how I would evaluate the quality of an answer. Much of what I do below involves manual work, but it could be automated: First, …
Searke's user avatar
  • 4,469