This tag doesn't currently have an excerpt. Help contribute by writing one
Questions tagged [math.net]
256 questions
2
votes
1 answer
Check if root of cubic equation is complex or not?
I use this Cubic root implementation.
I have equation #1:
x³ -2 x² -5 x + 6 = 0
It gives me 3 complex roots ({real, imaginary}):
{-2, 7.4014868308343765E-17}
{1 , -2.9605947323337506E-16}
{3 , 2.9605947323337506E-16}
But in fact, the right result…

123iamking
- 2,387
- 4
- 36
- 56
2
votes
0 answers
MathNet.Numerics crashes with 'segmentation fault' when trying to switch to Intel MKL
I'm getting a
Segmentation fault (core dumped)
error when I try to run the following code under Linux:
// Using the Intel MKL native provider
MathNet.Numerics.Providers.LinearAlgebra.LinearAlgebraControl.UseNativeMKL();
var w =…

LukaszSkowronek
- 21
- 2
2
votes
1 answer
How do I tell if a solution to a set of equations is valid in Math.NET Numerics?
Trying to solve a system of linear equations using Math.NET Numerics but wont know in advance whether they will have a valid solution.
For example, the equations x + y = 10, x = 3, y = 7,
have an obvious solution.
In Math.NET, we programmed this as…

seants
- 21
- 1
2
votes
2 answers
How can I fit a sphere to a set of 3d points with least squares method?
I am trying to fit a sphere to a set of 3d points by using the method I found here: https://jekel.me/2015/Least-Squares-Sphere-Fit.
I do understand why and how the input matrix and vector are formed, but I have not understood the least squares…

Christian
- 317
- 1
- 14
2
votes
1 answer
Stats with Math.Net
How do you calculate the 99.5 percentile using Math.NET?
98 percentile is
MathNet.Numerics.Statistics.Statistics.Percentile(valuesInDecile, 100 - 2)
99 percentile is
MathNet.Numerics.Statistics.Statistics.Percentile(valuesInDecile, 100 - 1)
For a…

sofsntp
- 1,964
- 23
- 34
2
votes
0 answers
Linear Optimization in Math.net
Math.NET seems to have a significant amount of functions dedicated to non-linear optimization, which would seem to imply that it also has some faculty for performing linear optimization, but I've been looking through the documentation and can't seem…

The Zach Man
- 738
- 5
- 15
2
votes
1 answer
Is it possible to parse and evaluate inequalities?
As per title, is it possible to parse and evaluate inequalities obtaining a true/false result?
As example:
Expression e = Infix.ParseOrThrow("A

Michele mpp Marostica
- 2,445
- 4
- 29
- 45
2
votes
1 answer
Interpret and adjust Kalman Filter velocity prediction
I use MATH.NET implementation of Kalman Filter
My example is similar to example described in this very useful manual:
Consider a truck on frictionless, straight rails. Initially, the truck
is stationary at position 0, but it is buffeted this way…

Stanislav
- 551
- 7
- 21
2
votes
1 answer
Math.net Powers of Trigonometric Functions in C#
How do I get powers of a trig function in Math.net?
Expr x = Expr.Variable("x");
Expr g = (2 * x).Sinh().Pow(2);
g.ToString() gives the output: (sinh(2*x))^2
What I want is sinh^2(2*x)
How do I do that?
Edit:
As per Christoph's comment below this…

Paul Matthews
- 2,164
- 5
- 20
- 29
2
votes
0 answers
Factorising with MathNet.Symbolics in c#
I am trying to factorise: 5x+10 -> 5(x+2)
Everything I have tried either fails miserably or just returns "10+5*x", or worse.
public void Factorising()
{
var expr = "5*x+10";
var parsing = Infix.ParseOrThrow(expr);
var…

kizzer
- 150
- 7
2
votes
1 answer
Compute critical value T-Score using Math.NET
Any thoughts on how I can compute critical value in a t-distribution using Math.NET?
More concretely, I am looking for how to compute the following excel function using Math.NET.
=T.INV.2T(0.05, 8)

Dr. Strangelove
- 2,725
- 3
- 34
- 61
2
votes
1 answer
Types with Math.net numerics
I am starting to use the Math.net numerics library and I can't find examples, so I'm running into a few issues:
To make a simple example, I have two arrays of doubles. I want to divide one by the other and then calculate the moving average.
So, the…

Thomas
- 10,933
- 14
- 65
- 136
2
votes
0 answers
How can one get t-statistic for each coefficient in Math.NET multiple regression
I want to perform a multiple regression using Math.NET. For each coefficient I need to get a t-statistic or at least a standard error. How can I do this with Math.NET? I couldn't find it in the docs.
x = new double[3][];
for (int i = 0; i < 3; i++)…

shda
- 729
- 7
- 19
2
votes
1 answer
Fundamental solution of homogeneous linear equations: Ax=0 with Det(A)=0 with MathNet
I am trying to solve a system of homogeneous linear equations like Ax=0.
Here is an example matrix which has already been reduced for simplicity:
1 2 | 0
3 6 | 0
The solution I am hoping to get is at least [ 2, -1 ]. But the fundamental solution is…
2
votes
1 answer
Math.NET Numerics - How to represent missing or invalid values?
Does the library have some way to represent missing or invalid values in vectors and matrices? A good reference is Numpy masked arrays.

boechat107
- 1,654
- 14
- 24