Minding the fact that
In[102]:= {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}[[1 ;; 2, 1 ;; 2]]
Out[102]= {{1, 2}, {4, 5}}
is the upper left submatrix.
I would like to do the following :
> helios = {{{3, 2}, {1, 2}}, {{3, 2}, {2, 1}}, {{3, 1}, {2, 2}}, {{1,
> 3}, {2, 2}}, {{2, 3}, {1, 2}}, {{2, 3}, {2, 1}}, {{1, 2}, {3,
> 2}}, {{2, 2}, {3, 1}}, {{2, 1}, {3, 2}}, {{2, 1}, {2, 3}}, {{1,
> 2}, {2, 3}}, {{2, 2}, {1, 3}}}
ReplacePart[{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}, {1 ;; 2,
1 ;; 2} -> #] & /@ helios
That is, i would like to replace the upper left submatrix by a series of other matrices ! But this does not work as :
ReplacePart::pkspec1: The expression 1;;2 cannot be used as a part specification.
Does anyone have a efficient way of doing this ? with built-in functions if possible.
Thank you very much.