Questions tagged [mathnet-numerics]

Math.NET Numerics is an opensource numerical library for .Net, Silverlight and Mono.

Math.NET Numerics is the numerical foundation of the Math.NET project, aiming to provide methods and algorithms for numerical computations in science, engineering and every day use. Covered topics include special functions, linear algebra, probability models, random numbers, statistics, interpolation, integration, curve fitting, integral transforms (FFT) and more.

In addition to the core .NET package (which is written entirely in C#), Numerics specifically supports F# 3.0 with idiomatic extension modules and maintains mathematical data structures like BigRational that originated in the F# PowerPack. If a performance boost is needed, the managed-code provider backing its linear algebra routines and decompositions can be exchanged with wrappers for optimized native implementations such as Intel MKL.

Supports Mono and .NET 4.0 on Linux, Mac and Windows, the portable version also Silverlight 5, WindowsPhone 8 and .NET for Windows Store apps.

Source: GitHub: Math.NET Numerics ReadMe file

230 questions
0
votes
1 answer

MathNet - Least computationally expensive way of extracting a large submatrix from a large matrix

I'm trying to extract a large submatrix from a parent matrix using the MathNet package. I couldn't find a builtin function to do it so i wrote this simple function in VB.net: Private Function Extract(s As Matrix, RowsAndColumns As Int32()) As…
Joseph
  • 380
  • 3
  • 16
0
votes
1 answer

How to use math.Net numerics in Visual Studios

I am just testing to see if I can utilize math.Net Numerics for upcoming Linear Algebra classes and I am having trouble. I normally use R and Python but I felt like testing this out. I literally am brand new to Visual Studio. For some reason I…
Brian Wiley
  • 485
  • 2
  • 11
  • 21
0
votes
1 answer

MathNet Numerics Complex32 ToString Method returning incorrect format

I tried to use the ToString() method to convert a Complex32 value in the form: Z = x + iy. There are these overloads of the ToString() Method: Complex32 ToString Overloads: string ToString(string format, IFormatProvider provider) string…
retriever
  • 1
  • 2
0
votes
1 answer

Flattening/Reshaping a DenseMatrix

Is there a concise way to flatten a matrix? // Install-Package MathNet.Numerics // Install-Package MathNet.Numerics.FSharp // Compile to move the .dlls to the bin/debug area #r @"bin/Debug/MathNet.Numerics.dll" #r…
0
votes
0 answers

double[][] from DataTable

I'm using the Math.Net Numerics package to do some statistics work with regression, etc. Because an assortment of different columns from a particular table may be used as independent variables, I decided to write a method that will create a Matrix…
Valuator
  • 3,262
  • 2
  • 29
  • 53
0
votes
2 answers

2D Trilateration using linear least squares in C#

I am doing 2D trilateration using the MathNet for the matrices and vectors. This i my code: public static double[] trilaterate2DLinear(double[] pA, double[] pB, double[] pC, double rA, double rB, double rC) { //Convert doubles to…
Kafros
  • 166
  • 14
0
votes
2 answers

Resize matrix in MathNet

If I have a matrixA that is 1x5 with all values = 1.0, and I want to resize it to 1x8 by having other elements as 0's, how do I do it? Matrix A = Matrix.Build.Dense(1, 5, 1.0); In other words, is it possible to multiple or carry out…
opto abhi
  • 317
  • 1
  • 3
  • 13
0
votes
1 answer

Double to Decimal in MathNet

Taking notes from my previous question,I created few function that return double. using System; using MathNet.Numerics.Statistics; using System.Linq; public class Program { public static void Main() { decimal[] values = new[] {…
vish1990
  • 272
  • 3
  • 16
0
votes
1 answer

Finding changes in a list then storing specific values into an array C#

I have a class: namespace XMLParserAverage11 { public class cPoint { public string point; public string time; public double xPoint; public double yPoint; public double StdDevX; public…
ChrisD91
  • 249
  • 3
  • 10
0
votes
1 answer

Translate operations on native types to Math.NET Numerics

In my effort to shift from using native F# types to Math.NET Numerics types an example would be most helpful. How would the following be expressed as an operation on DenseMatrix or DenseVector types? I've played around with the snippet below to…
0
votes
1 answer

array concatenation in F#

Are there any analogs to Matlab's horzcat() and vertcat() functions in F#? Because what I'm doing now seems asinine. There is a related question here but it seems pretty dated. let arr = Array.init 5 (fun i -> 1.) let xMat = DenseMatrix.init…
0
votes
1 answer

Broadcasting operations in MathNet

Suppose I have the following…
0
votes
1 answer

DenseMatrix invalid assignment

Not sure how to populate a DenseMatrix type: let rows = [|for line in File.ReadAllLines("Z:\\mypath.csv") |> Seq.skip 1 do yield line.Split(',') |> Array.map float|] let data = DenseMatrix.ofRowArrays rows let mutable data_logdiff =…
0
votes
1 answer

Simple Implementation of MATHNET Filtering Lowpass filter

I have created the following code: Double[] ArrayOfData = new Double[Size] { 0.5, 1.5, ... , 1.0 }; var lowPass = MathNet.Filtering.IIR.IirCoefficients.LowPass(0, 0, 0); MathNet.Filtering.IIR.OnlineIirFilter filter = new…
Maderas
  • 231
  • 2
  • 14
0
votes
0 answers

'UseNativeMKL' is not a member of 'Control'

I am using v3.11.1 of math.net. MathNet.Numerics.MKL.Win v2.0 is already installed using NuGet. x86 and x64 folders are already exist in debug directory. Related DLLs such as 'MathNet.Numerics.MKL.dll' and 'libiomp5md.dll' and 5 more are already…
Amin
  • 11
  • 3