Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Decomposition of a matrix in subvectors

I have a matrix say

M = matrix([[0,0,5,3],[3,1,5,4],[4,4,6,2],[4,2,7,8],[5,4,6,6],[7,5,8,9]])

do divide the lines in two part 3/3 and construct all the vector composing the two submatrix. I want to know if it is possible to index those vectors ? I know how to do this for one shot

A=M.delete_columns([1,2,3]).delete_rows([3,4,5])

Decomposition of a matrix in subvectors

I have a matrix say

M = matrix([[0,0,5,3],[3,1,5,4],[4,4,6,2],[4,2,7,8],[5,4,6,6],[7,5,8,9]])

do divide the lines in two part 3/3 and construct all the vector composing the two submatrix. I want to know if it is possible to index those vectors ? I know how to do this for one shot

A=M.delete_columns([1,2,3]).delete_rows([3,4,5])

If I have understud there is a mecanism to construct block matrix not to deconstruct a matrix in block.

Here are the vectors

M_1=[0, 3, 4] M_5=[4, 5, 7]

M_2=[0, 1, 4] M_6=[2, 4, 5]

M_3=[5, 5, 6] M_7=[7, 6, 8]

M_4=[3, 4, 2] M_8=[8, 6, 9]

of course column vectors.