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 allclose allclcx=[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 onxlabel('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])
Best Answer