How can get a better Polynomial out of this data?
Afficher commentaires plus anciens
Hello everyone,
I am trying to obtain a sensible polynomial out of the following potted data. It seems to me that the results I am obtaining are not very precise and don' really reflect the curve obtained. Is there another way I could get a better polynomial describing the plotted data?
Thank you in advance.
clear all
close all
clc
x=[0 54 174 250 282 330 355]; % Degrees
y=[98 17.95 46.51 48.37 11.16 74.4 100];%percentage
xx= (0:0.5:360);
s = spline(x,y,xx);
p1=polyfit(xx,s,3);%****
disp(p1)%** not accurate enough!!!
figure;
plot(x,y,'ko',xx,s,'linewidth', 2 );
grid on
xlabel('Angle in Degrees')
ylabel('Velocity Percentage')
set(gca,'XTick',[0:20:360]);
set(gca,'XTickLabel',[0:20:360]);
set(gca,'YTick',[0:10:110]);
set(gca,'YTickLabel',[0:10:110]);
xlim([0 360])
ylim([0 110])
3 commentaires
Star Strider
le 11 Avr 2020
The most appropriate model is a mathematical description of the process that created the data. Then use one of the nonlinear parameter estimation functions (lsqcurvefit or nlinfit) to fit the function to the data.
The present approach is likely not the best use of either spline or polyfit.
.
Seba.V
le 11 Avr 2020
Star Strider
le 11 Avr 2020
My pleasure.
It would be necessary to have a mathematical expression of that system, along with a description of what the data represent and the parameters you want to estimate.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Polynomials dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
