Curve fitting for degrees less than one

3 views (last 30 days)
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

Ameer Hamza
Ameer Hamza on 30 Nov 2020
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.

More Answers (0)

Categories

Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!