NMath Tutorial

Fitting Geometric Primitives to Points Using Nonlinear Least Squares

We were recently contacted by a customer looking for help on how to use NMath to fit geometric primitives to clouds of 2D points. The solution is to cast the problem as a minimization. In the space of the parameters which define the geometric object, minimize the residuals with respect to the 2D points. NMath provides .NET classes for solving nonlinear least squares problems such as this, using th...
Read More

Advanced Curve Fitting using Excel and NMath

In recent blog posts, we have discussed how to call CenterSpace's Libraries from Excel. In his March 2010 blog post, CenterSpace's Ken Baldwin demonstrated how to replicate Excel's existing Trendline functions using C# and NMath. In this post, we will demonstrate the advanced curve fitting functions available in the CenterSpace libraries that could be easily be integrated into Excel analysis wor...
Read More

Using NMath with Microsoft Chart Controls for .NET

In 2007, Microsoft acquired the Dundas chart components, in order to deliver data visualization directly within Microsoft products. In October 2008, they released the Microsoft Chart Controls for .NET, which includes the Dundas ASP.NET and Windows Forms Chart controls. The Chart controls are available as a separate download for .NET 3.5. Beginning in .NET 4.0, the Chart controls are part of the .N...
Read More

Quasirandom Points

A quasirandom sequence is a set of n-tuples that fills n-space more uniformly than uncorrelated random points. NMath provides both Sobol and Niederreiter quasirandom number generators for .NET applications. For example, this C# code creates a Niederreiter quasirandom number generator object to generate quasirandom vectors of length 2: int dim = 2; NiederreiterQuasiRandomGenerator nqrg = ne...
Read More

Using C# and ExcelDNA to call .NET Libraries

In my last post, I demonstrated calling NMath from Excel using ExcelDNA and Visual Basic (VB) code. In this blog post, we will duplicate that functionality using C# instead of Visual Basic. In addition we will use the functionality of NMath to enabled the marshaling of data between Excel and NMath, and provide some additional code examples. The outcome of these blog articles should illustrate...
Read More