Polynomial Fitting in C#

PolyFitCSharpExample

This is a third post in the polynomial fitting series demonstrating how to perform polynomial fitting using LU decomposition in C#. For more information on polynomial fitting please refer to the pervious post polynomial fitting in C++.

Full source code can be downloaded below. Please note that the code is not highly optimized for readability purposes.

Download Example
Download Source Code

Once downloaded you will need to navigate to the folder ‘PolyFitCSharp\ThirdPartGuiLibraries‘ and unblock DynamicDataDisplay.dll and Xceed.Wpf.Toolkit.dll by right clicking each file and selecting Properties from the menu then clicking Unblock button as shown in the image below.

PolyFitCSharpUnblockDLL

The polynomial fitting code is located in its own project called PolynomialRegression under the PolyFitExample solution. Below is code listing for the example usage.

Main class used for polynomial fitting is PolyFit. It relies on further internal classes but their listing is beyond the scope of this post.