Curve fitting for degrees less than one

So, I was trying to curve fit stretch and strain curve for Mooney Rivlin model and I was just curious if it is at all possible to curve fit a variable for powers less than one? I want fit for x^2, x^1 ,x^-1 and x^-2. But the curve fitting toolbox wont let me manually choose the power. As soon as I set the degree to 4, the powers are 1,2,3 and 4 by default.

 Accepted Answer

You can choose any exponent you want. For example
x = linspace(1, 2);
y = 2*x.^0.5 + 4.1*x.^1.2 + 3.3;
ft = fit(x.', y.', 'a*x.^0.5 + b*x.^1.2 + c')
Are you using cftool? If yes, choose custom equation in the menu.

2 Comments

Thankyou that was really helpful
I am glad to be of help!

Sign in to comment.

More Answers (0)

Categories

Products

Release

R2020a

Community Treasure Hunt

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

Start Hunting!