Least Squares Fitting_Polynomial

Finding the best-fitting curve to a given set of points using Least-Squares method
617 Downloads
Updated 23 Apr 2016

View License

We are given measurements of air pollution, in the form of the concentration of NO (y=[110.49 73.72 23.39 17.11 20.31 29.37 74.74 117.02 298.04 348.13 294.75 253.78 250.48 239.48 236.52 245.04 286.74 304.78 288.76 247.11 216.73 185.78 171.19 171.73 164.05]), over a period of 24 hours(t=(0:24)), on a busy street in a major city. Since the NO concentration is mainly due to the cars, it has maximum values in the morning and in the afternoon, when the traffic is most intense. Here, we used the Least-Squares technique of data fitting for the purpose of
approximating measured discrete data: we fitted a polynomial to given data in order to be able to compute smoothed data for any value of the independent variable (t) in the model (f).

Cite As

Meysam Mahooti (2024). Least Squares Fitting_Polynomial (https://www.mathworks.com/matlabcentral/fileexchange/56155-least-squares-fitting_polynomial), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0

The image is added.