This project has moved and is read-only. For the latest updates, please go here.

Transpose a vector

Jul 15, 2014 at 3:22 PM
Hello all,

is it really not possible to transpose a vector?
i mean
A = new Vector
A_transposed = A'
shouldnt be a big problem? Or with other words this is needed
really often, isnt it?

Jul 15, 2014 at 6:28 PM
It doesn't make sense in Math.NET Numerics.
A vector here is neither a row-vector nor column-vector, unlike in Matlab.
It is just closer to a c# single dimension array.
If you need to distinguish, you can always use a 1xN or Nx1 Matrix.
You can get from a Vector to the corresponding Row or Column Matrix using:
Vector.ToRowMatrix() and Vector.ToColumnMatrx()
Marked as answer by MichaelMichael on 7/17/2014 at 1:00 AM
Jul 16, 2014 at 1:17 PM
thank you for the help and the great explanation,
really fast and informative.
Thank you,
Jul 16, 2014 at 1:36 PM
Edited Jul 16, 2014 at 4:04 PM
by the way, could you please help me with a matrix access?
How could i do this matlab syntax?
Mnew = M (:,2)
Mnew = M(3,end)

and is slicing only in f# possible? Because
Matrix<double> Mnew = M[0,2..4]
causes problems?

do you have experiences here also?

Jul 16, 2014 at 8:04 PM
You can use the SubMatrix() method to extract contiguous slices.
Marked as answer by MichaelMichael on 7/17/2014 at 12:59 AM
Jul 17, 2014 at 9:00 AM
thank you.