Cure Fitting is one of the Toolbox in matlab .Curve fitting used to draw our data points in different types of fittings.In curve fitting contain following fittings.
- Spline Interpolant
- Space-preserving Interpolant
- Quadratic
- Cubic
- 4th Degree Polynomial
- 5th Degree Polynomial
- 6th Degree Polynomial
- 7th Degree Polynomial
- 8th Degree Polynomial
- 9th Degree Polynomial
- 10th Degree Polynomial
The above type of polyfiting are there in matlab.
In below example to use the poly fitting in our data s.
In below example to use the poly fitting in our data s.
>> xdata1 = 1:10;
>> ydata1 = rand(1,10);
>> axesLimits1 = [min(xdata1) max(xdata1)];
>> ydata1 = rand(1,10);
>> axesLimits1 = [min(xdata1) max(xdata1)];
>> xplot1 = linspace(axesLimits1(1), axesLimits1(2));
>> fitResults1 = polyfit(xdata1, ydata1, 1);
>> fitResults1 = polyfit(xdata1, ydata1, 1);
>> yplot1 = polyval(fitResults1, xplot1);
>> figure;plot(xplot1,yplot1,'color','red')
>> hold on;
>> drawnow;
>> plot(xdata1,ydata1);
>> plot(xdata1,ydata1);
No comments:
Post a Comment