Given that I have the following array
lst = Array[Subscript[P, #1, #2] &, {5, 5}, {0, 0}]
$ \left( \begin{array}{ccccc} P_{0,0} & P_{0,1} & P_{0,2} & P_{0,3} & P_{0,4} \\ P_{1,0} & P_{1,1} & P_{1,2} & P_{1,3} & P_{1,4} \\ P_{2,0} & P_{2,1} & P_{2,2} & P_{2,3} & P_{2,4} \\ P_{3,0} & P_{3,1} & P_{3,2} & P_{3,3} & P_{3,4} \\ P_{4,0} & P_{4,1} & P_{4,2} & P_{4,3} & P_{4,4} \end{array} \right)$
Then I need to partion it into the following matrix blocks
MY TRIAL
Row[
{Partition[lst, {2, 3}, {1, 2}] // MatrixForm,
Partition[lst, {3, 3}, {2, 2}] // MatrixForm,
Partition[lst, {3, 4}, {2, 3}] // MatrixForm}]
Row[
{Partition[lst, {4, 4}, {3, 3}] // MatrixForm,
Partition[lst, {5, 5}, {4, 4}] // MatrixForm}]
ANOTHER TRIAL
Partition[lst, {3, 3}, {2, 2}, 1, {}] // MatrixForm
Partition[lst, {4, 4}, {3, 3}, 1, {}] // MatrixForm
Partition[lst, {3, 4}, {2, 3}, 1, {}] // MatrixForm
I searched the documentation of Partition
, and I didn't discovred a directed method to deal with this problem. Could some know any simple way to do this?I really appreciate it:)
Partition[lst, {3, 4}, {2, 3}, {{1, 1}, {-1, 1}}, {}]
. $\endgroup$Nothing
trick I told you about? $\endgroup$