Pergunta

What is the math.net equivalent of this type of MATLAB operations on matrices for matrix juxtaposition?

A = [2 2; 3 3]
B = [4 4; 5 5]
C = [A B]
D = [A; B]

Is there a cheat sheet that compares MATLAB/NUMPY to Math.net? That may help me in the future. Thanks.

Foi útil?

Solução

Found a relatively eye-pleasing solution:

let C = A.append(B)
let D = B.stack(D)

Thanks for help.

Outras dicas

Looking at the docs here: http://nmath.sourceforge.net/doc/numerics/

I think the best solution would be something like:

let retmatrix = Matrix(A.RowCount + B.RowCount, A.ColumnCount)
retmatrix.SetMatrix(0,A.RowCount,0,A.ColumnCount,A)
retmatrix.SetMatrix(A.RowCount,A.RowCount+B.RowCount,0,B.RowCount,B)
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top