Why there's opposite fit results phenomenon between the oddnomial and the evennmnial?

2 views (last 30 days)

p=polyfit(RANKING,Total,4);
y=polyval(p,Total);
plot(y)

Accepted Answer

Mathieu NOE
Mathieu NOE on 24 Jan 2025
hello
I suspect this is what you wanted to do (?)
load('Ranking.mat')
plot(RANKING,Total);grid on
hold on
order = 5; % 3 and above are fine
p=polyfit(RANKING,Total,order);
% y=polyval(p,Total);
y=polyval(p,RANKING);
plot(RANKING,y)
legend('data','fit');
hold off

More Answers (0)

Categories

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

Tags

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!