Guide for Matlab® Users

Matlab® is a well-known technical computing application with a focus on linear algebra calculations.

We also have guides for Visual Basic .NET and F#.

Numerics.NET includes classes for the following subject areas. Also see the detailed Vector and Matrix and Statistics feature lists.

Some key differences

Matlab® Numerics.NET in C#
The Matlab® language is a dynamically typed language. This means that variables can change type (for example, from integer to real or from real to complex) and shape (for example, from vector to matrix) at any point in the code. C# is a statically typed language. Although types of variables can often be inferred (through use of the var keyword), the actual type is fixed at the declaration.
Matlab® was designed for linear algebra. The syntax for working with vectors and matrices is clear and concise. General programming constructs and tasks are often tedious. C# is a general purpose language with no specific support for linear algebra. The syntax for working with vectors and matrices can be verbose. General programming constructs and tasks are well supported.
In Matlab®, the core data type is a multi-dimensional array of numbers that can represent a row vector, a column vector, a matrix, or a higher-dimensional tensor. In C#, there are separate data types for vectors and matrices. There is no distinction between row and column vectors. Higher-dimensional arrays are not supported at this time.
In Matlab®, indexes are 1-based. The first element of an array is accessed using a(1). In C#, indexes are 0-based. The first element of an array is accessed using a[0].
In Matlab®, arrays are passed by value. Data isn't actually copied until changes are made. In C#, arrays are passed by reference. Changing a vector or matrix parameter will change the original array.
In Matlab®, slicing operations copy a part of the array. In C#, slicing operations produce views into the original array.