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
2
votes
1 answer

How can I access the PseudoInverse() and AsArray() functions of DenseMatrix in MathNET?

I am looking through the documentation of Matrix in MathNet, and have tried initializing my matrix in different ways. using MathNet.Numerics.LinearAlgebra; using MathNet.Numerics.LinearAlgebra.Double; Matrix a = Matrix.Build(3, 3,…
ArKi
  • 681
  • 1
  • 10
  • 22
2
votes
1 answer

Mean and standard Deviaton of array with Math.Net

I am using MathNet .dll and have to calculate mean and standard deviation from array of decimal values. using MathNet.Numerics.Statistics; static void Main(string[] args) { decimal[] values = { 39.99m, 29.99m, 19.99m, 49.99m…
vish1990
  • 272
  • 3
  • 16
2
votes
1 answer

Simple Linear Regression with constraint using Math.net and C#

I'm using Math.net and C# for simple linear regression of two double arrays (XValues, YValues) which contain physiological data. There are good grounds for constraining the intercept to the origin. At the moment I'm using: Tuple r =…
Andy Pybus
  • 21
  • 2
2
votes
2 answers

What is the MathNet equivalent of numpy array[0,:] *= 1.23

I have to port some python (numpy) code in c# (MathNet). I can write in python: mtx = np.array([[0,1,2],[3,4,5]]) mtx[0,:] *= 1.23 #multiply all elements in row 0 by 1.23 How can I do this in MathNet? Is there better (faster) solution than: …
ThWin
  • 33
  • 4
2
votes
2 answers

MathNumerics.LinearAlgebra Matrix.mapRows dimensionality issues

So I have verified that the starting version of what I'm trying to do works, but for some reason when putting it into the Matrix.map high order function it breaks down. Here is the failing function: let SumSquares (theta:Vector)…
David Crook
  • 2,722
  • 3
  • 23
  • 49
2
votes
1 answer

fit a curve with Math.Net that pass through origin

I have a set of (Xi,Yi) point that should be fitted by 3rd degree polynomial function that pass through zero. I consider to use MathNet.Numerics for this task, but I don't see in the documentation an option to force the fitted function to pass…
atrash
  • 865
  • 1
  • 8
  • 11
2
votes
1 answer

How to set double precision in MathNet.Symbolics Evaluate function?

I have a Dictionary values and values precision is important for me. I have a string Formula that Infix can Parse. I wonder how to do something like this: var expr = Infix.ParseOrThrow(m.Formula); var result =…
DuckQueen
  • 772
  • 10
  • 62
  • 134
2
votes
1 answer

Make Math.NET Fourier work

I am trying to find a solution for some weeks now and I really have read all threads related with this topic, so I really hope someone can help me out with this. What I want to do is to use a wave-file as input, fourier-transform it and take these…
webfreak1364
  • 21
  • 1
  • 3
2
votes
2 answers

MathNet - 'System.TypeInitializationException'

I am trying to parse string of expression using MathNet in C# and when I try this code: var h = MathNet.Symbolics.Infix.ParseOrUndefined("1/(a*b)"); it threw exception. "An unhandled exception of type 'System.TypeInitializationException'…
2
votes
1 answer

Extracting common terms with MathNet Symbolics

I'm using MathNet Symbolics to handle the symbolic algebra portion of a program I'm working on. The general use is create a pair of symbolic formulas, and then divide those two formulas. This works quite well most of the time. However, sometimes, it…
Matt Sieker
  • 9,349
  • 2
  • 25
  • 43
2
votes
1 answer

Can I draw the area of an integral with Oxyplot?

Is it possible to draw the area of a certain integral in Oxyplot? With the MathNet.Numerics library it is possible to calculate these integrals but I am wondering if I am able to draw it in my plot?
binaryBigInt
  • 1,526
  • 2
  • 18
  • 44
2
votes
1 answer

Entity Framework 6 Persist a MathNet.Numerics Matrix

We have a class that wraps a MathNet.Numerics matrix: public class Matrix { public MathNet.Numerics.LinearAlgebra.Matrix _matrix { get; set; } public int? DatabaseId { get; set; } // ... } We need to store this Matrix in the…
Scotty H
  • 6,432
  • 6
  • 41
  • 94
2
votes
2 answers

Find covariance of Math Net matrix

I'm using MathNet Numerics matrices and trying to find out covariance of a matrix. How can we find covariance of matrix? We have method to find covariance between two IEnumerable under Statistics…
malkam
  • 2,337
  • 1
  • 14
  • 17
2
votes
2 answers

Mono Mathnet MKL Nativer provider not found

I'm trying to use the Mkl native provider from mathdotnet with mono in Linux. I'm using monodevelop and installed MathNet.Numerics and both MathNet.Numerics.MKL.Linux-x64 and -x86 packages via the build in NuGet package manager. When I try this…
Robert
  • 101
  • 7
2
votes
2 answers

Why is the MathNet.Numerics NuGet package so big?

I recently added MathNet.Numerics through NuGet to my C# solution. The package directory in the solution folder ballooned to about 50 MB! Yet I can simply download the MathNet dll and use only that, which takes up only 1.5 MB. If I want…
Superbest
  • 25,318
  • 14
  • 62
  • 134