Reputation: 13
I am switching from MATLAB to VS2012. I want to use Math.net Numeric to solve my matrix based equations. I am having hard time to define a simple matrix in VS2012 in VB environment using Math.Net matrix. I have found many articles on F# and how to define a matrix, but no luck in VB. I tried Public MAT1 As Matrix(Of
but I don't know how to finish the declaration. Does anyone know? Thank you.
Upvotes: 1
Views: 2226
Reputation: 754
The MathNet library has predefined Matrix classes for singles, doubles, and complex values.
For example, to instantiate a 3x3 matrix of doubles, use:
Dim m = MathNet.Numerics.LinearAlgebra.Double.Matrix.Build.DenseOfArray({{1, 2, 3}, {4, 5, 6}, {7, 8, 9}})
Each operation on the matrix returns a transformed matrix:
Dim m2 = m.Multiply(1.5)
Upvotes: 2