I have a function that manipulates a Vector<float>
resulting a new Vector<float>
with different length, an example would be appending a number in front of the vector
let addElementInfront (x:Vector<float>) =
x.ToArray()
|> Array.append [|x.[0]|]
|> vector
Now I want to apply this to all the rows of a (2x2) matrix and I would expect a (2x3) matrix, I tried to use the Matrix.mapRows
of MathNet.Numerics.LinearAlgebra
but it gives me error that the size needs to be the same.
Just wonder if MathNet has any other function to map rows that results a different size matrix.
Thanks.