Message Boards Message Boards

0
|
932 Views
|
3 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Parameters obtained from FindFit don't give the best fit

Posted 5 months ago

Have a good day. What I want to do is to find the parameters δ0, δ2, δ4 to fit the data set "Nilson123" (1) to the "y" function (3). When I run the "FindFit" (4), I obtain the the parameters output as (5). I put these parameters to the y function (6) but I obtain a fit which is very bad (7). However when I put another parameter values δ0=0.611, δ2=2.00, δ4=0.026 from literature to the y function (8), I acheive a better fit. I couldn't understand why the parameters obtained with the FindFit function don't work. Is there anyone to help me?

POSTED BY: Osman Ala
3 Replies

Your code is full of syntax errors and does not run. You have a variable i which I suspect should be I.

However, in the nonlinear case FindFit only finds local best fits. You can supply starting values for the optimization algorithm.

POSTED BY: Gianluca Gorni
Posted 5 months ago

Thank you Gianluca for your comments. I think syntax errors occured while the copy-paste procedure. Now, taking your advice into account I will try starting values option.

POSTED BY: Osman Ala
Posted 5 months ago

It worked. Thank you very much again.

POSTED BY: Updating Name
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract