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
1
vote
1 answer

Creating a Matrix.Build.Dense() using Expression.Call

I want to return an Expression.Call that creates a dense MathNet Matrix. This is the Matrix I want: Matrix.Build.Dense(Rows,Columns) ContentType will be int, double or Complex. But I want to create it using Expression.Call. Here's my…
Henri
  • 205
  • 1
  • 9
1
vote
0 answers

MathNet cubic spline interpolation find maximum curvature

I want to find the maximum curvature point of a cubic spline using MathNet. I know the math behind it and I know how to do it with python - but the current project I'm working on is under .NET. I turned to MathNet for that but I'm not sure I have…
miculnegru
  • 11
  • 3
1
vote
1 answer

Mathnet Filtering cutoff frequency

so I've been trying to implement a low pass filter in C# with the Mathnet filtering library. I have a problem because I don't know how to use the method to create coefficients for the filter. Can someone tell me how to specify the cutoff…
xxm0dxx
  • 115
  • 1
  • 10
1
vote
2 answers

MathNet Numerics - Fourier - "Specified method not supported"

I have a C# application, I installed MathNet.Numerics 3.17.0 via Nuget. I am trying to use the fourier functions. When I run this line of code: Fourier.Forward2D(n); It throws an exception "Specified method not…
Alex Martin
  • 156
  • 9
1
vote
0 answers

fminunc alternate in Math.NET Numerics(C# )

Is there an alternative to the fminunc function (from octave/matlab) in Math.NET Numerics? python solution this is an answer for python. Is there any function in Math.NET Numerics? fminunc:"Conjugate gradient", "BFGS", and "L-BFGS" no need to give…
Wei
  • 19
  • 7
1
vote
0 answers

How to Nonlinear Regression Using MathNet Numerics Lib in C#?

I have a function like this. I know that value Ri(mi) and mi ( I have mi and Ri(mi) array). I need to solve the nonlinear equation using the MathNet Numerics library. Reducing the fault most, It must guess the values (a,b,c,T). How can I do…
Mehmet Avcı
  • 95
  • 1
  • 10
1
vote
0 answers

The arguments type and the return type in specific methods of MathNet.Numerics

C# is a strongly-typed language, when I use MathNet.Numerics in C#, this put me to trouble. for example: when I call the PointwiseMultiply() method, the former matrix and the latter one must be the same type. That means I must convert a…
1
vote
1 answer

Linear equation system solver results (MATLAB vs Math.NET vs Python)

[1] C#: Solving a system of equations using Math.NET library // test solver in Math.NET var A = Matrix.Build.DenseOfArray(new double[,] { {1, 1, 3}, {2, 0, 4}, …
opto abhi
  • 317
  • 1
  • 3
  • 13
1
vote
0 answers

Right Matrix Division in C#

How can I perform a Right Matrix Division in C#?. In MATLAB the code would be AA(I) = ((X(I,:)-mu)/si)*(X(I,:)-mu)'; %where, %I is index %AA is a matrix of 1330x1 double %X is a matrix of 1330x158 double %mu is a matrix of 1x134 double %si is a…
opto abhi
  • 317
  • 1
  • 3
  • 13
1
vote
1 answer

Multi-threaded operations

I was working on solving a tri-diagonal system with Math.Net. I've installed the MKL (x86) and the OpenBLAS extension, but apparently when I see the CPU usage I only see one core is working. This is the…
7raiden7
  • 319
  • 1
  • 4
  • 16
1
vote
1 answer

Assignment to mutable variable interferes with type inference of otherwise valid calculation

I'm attempting some Newton Raphson updates. Here is a piece of code that compiles and runs (warning: infinite loop). let thetam = [|beta; sigSq|] |> DenseVector let mutable gm = grad yt xt betah sigSqh // returns DenseVector let hm = hess yt xt…
1
vote
0 answers

Delayed matrix from a vector

In Math.Net Linear Algebra, you can write extension that allows you to use very nice slice notation: // Open Math.NET namespaces (you need MathNet.Numerics package) open MathNet.Numerics open MathNet.Numerics.FSharp open…
Ivan
  • 7,448
  • 14
  • 69
  • 134
1
vote
0 answers

How could I determine number of iterations untill convergence of iterative solvers in Math.NET?

I am using last version of Math.NET. I tried "residualStopCriterion._lastIteration" but it only works in debug mode since it's a non-public member. I need to save this values in a file.
Amin
  • 11
  • 3
1
vote
1 answer

MathNet real double precision issue

I need to write a function to compare the string value "15.0000000000000001" to "15" and I am using MathNet. Using MathNet.Symbolics.Expression.Real only accepts double. When I do the following Expression valOne =…
1
vote
1 answer

Math.Net how to generate vector of exponential distribution random numers

I am trying to generate random numbers with exponential distribution. I have found Math.NET NuGet package. It looks nice, but I can not figure out how to generate a vector of these kind of data. I have included the reference and tried something like…