Fit curve to a model problem

3 views (last 30 days)
John Terry
John Terry on 3 Nov 2021
Commented: the cyclist on 4 Nov 2021
Hi dear users,
I have a set of data in the graph below
And I'm trying to fit this data to a Magic formula tyre model which looks like this
Where D,C,B, and E are coefficients that I need to get from Matlab.
Now I've tried the fitting tool and inserting this custom model but I can never get it to fit even remotely good.
Anyone have any ideas?

Accepted Answer

the cyclist
the cyclist on 3 Nov 2021
Personally, I would use fitnlm from the Statistics and Machine Learning Toolbox, but that is mainly due to familiarity, I suppose.
Could it be poor initial guesses for the parameters? For example, if you start with B > 0, I can imagine a fitting routine might struggle.
Can you upload the data here?
  1 Comment
John Terry
John Terry on 4 Nov 2021
Thanks, i've tampered with the starting parameters and managed to get satisfying result.

Sign in to comment.

More Answers (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 4 Nov 2021
There are a couple of other fit model fcns of the toolbox that can be employed with your exercise. They are nlinfit() and nlintool()
  1 Comment
the cyclist
the cyclist on 4 Nov 2021
I would strongly recommend fitnlm over using nlinfit directly. fitnlm calls nlinfit under the hood, but the resulting model object you get is much easier in general to work with for next steps.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!