c# - Mathnet numerics indexing parts of a matrix -


using math.net numerics, how can index parts of matrix?

for example, have collection of ints , want submatrix rows , columns chosen accordingly.

a[2:3,2:3] should give me 2 x 2 submatrix of row index , column index either 2 or 3

just use thing

var m = matrix<double>.build.dense(6,4,(i,j) => 10*i + j); m.column(2); // [2,12,22,32,42,52] 

to access desired column use vector<double> column(int columnindex) extension method.


Comments