New answers tagged

3 votes
Accepted

Why does this simple fit run forever?

Remove the parameter constraints and you'll get a good fit ...
Ulrich Neumann's user avatar
3 votes

Why does this simple fit run forever?

...
cvgmt's user avatar
  • 68.9k
2 votes

Problem related to fitting a damped sine function

The usual methods of non-linear regression are iterative and require "guessed" or "estimated" values of the parameters to start the process. This is often a cause of difficulty ...
JJacquelin's user avatar
4 votes

Problem related to fitting a damped sine function

NonlinearModelFit requires parameter estimates in most cases - just provide acceptable guesses for the values. I downloaded your file, added a .dat extension, so I could Import[ ] it: ...
Vito Vanin's user avatar
1 vote

How do I fit unknown function to my data?

The problem comes from the Log term. The argument of Log must be a positive number. E.g., you may use "a2^2": ...
Daniel Huber's user avatar
  • 49.9k
1 vote

How do I fit unknown function to my data?

If you omit the first point {0,..} in your dataset and modify your model slightly you' ll get ...
Ulrich Neumann's user avatar
2 votes
Accepted

How to include Manipulate in fitting?

You could add slider for the lower and upper limit of each entry in restrs. Since you have 9 of these, then you need 18 sliders Note code does not check that lower ...
Nasser's user avatar
  • 142k
6 votes
Accepted

How can I use option Weights for fitting?

Instead of NMinimize, use NonlinearModelFit which supports Weights. To define the fitting ...
Domen's user avatar
  • 21.7k
5 votes

How can I use option Weights for fitting?

Unfortunately, NMinimize does not have an option "Weights". Only fitting functions have it. However, you my multiply the residues by 1/std^2 to achieve the same effect like: ...
Daniel Huber's user avatar
  • 49.9k
6 votes
Accepted

How can I fit rational function to data?

Assume the degree of the numerator is n and that of the denominator is m. Then we can make a rational fit using "NonlinearModelFit" like e.g.: ...
Daniel Huber's user avatar
  • 49.9k

Top 50 recent answers are included