Reputation: 4574
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.
Upvotes: 2
Views: 410
Reputation: 4574
Found a relatively eye-pleasing solution:
let C = A.append(B)
let D = B.stack(D)
Thanks for help.
Upvotes: 3
Reputation: 25516
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)
Upvotes: 0