MATLAB: Fitting a smooth curve

curve fittinggraphMATLABplottingsecond degreesmooththird degrre

I have the data as given. I need to fit a smooth curve through the data. The one I am getting right now for the second, third degree is relatively same(attached below). But I need one with a smooth curve. not the sharp turns. It doesn't matter if it passes through all the points or not. Any suggestions?
203.0173 -195.6477
275.3912 -244.2275
331.9024 -222.4161
387.4221 -173.8364

Best Answer

Curve Fitting Tool should do it for you:
x=[203.0173 275.3912 331.9024 387.4221];
y=[-195.6477 -244.2275 -222.4161 -173.8364];
%%below from here requires and comes from Curve Fitting Toolbox
[xData, yData] = prepareCurveData( x, y );
ft = fittype( 'poly3' );
[fitresult, gof] = fit( xData, yData, ft );
figure( 'Name', 'Fitted Model' );
h = plot( fitresult, xData, yData );
legend( h, 'y vs. x', 'Fitted Model', 'Location', 'NorthEast' );
xlabel x
ylabel y
grid on
You can reach the fitted model(3rd in this case) by typing
fitresult