How eliminate in an arbitrary order in subgroup of a nested matrix

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












How can reach the second matrix from the first nested one:



first=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1,
0;
second=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0;






share|improve this question
























    up vote
    3
    down vote

    favorite












    How can reach the second matrix from the first nested one:



    first=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1,
    0;
    second=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0;






    share|improve this question






















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      How can reach the second matrix from the first nested one:



      first=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1,
      0;
      second=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0;






      share|improve this question












      How can reach the second matrix from the first nested one:



      first=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1,
      0;
      second=0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0;








      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 8 at 4:29









      Irreversible

      1,623621




      1,623621




















          3 Answers
          3






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          One way to do this is with ArrayFlatten:



          ArrayFlatten[first]
          0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0





          share|improve this answer



























            up vote
            4
            down vote













            ArrayReshape[first, 4, 4]



            0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0




            Also



            Module[x = #, x[[All, 0]] = Sequence; x[[All, All, All, 0]] = Sequence; x] &@first
            MapAt[Sequence &, first, All, 0, All, All, All, 0]
            ReplacePart[first, _, 0 -> Sequence, _, _, _, 0 :> Sequence]





            share|improve this answer



























              up vote
              3
              down vote













              Two approaches I can think of:



              Partition[Flatten[first], 4]
              Flatten[first, 1, 2, 3, 4]





              share|improve this answer




















                Your Answer




                StackExchange.ifUsing("editor", function ()
                return StackExchange.using("mathjaxEditing", function ()
                StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
                StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
                );
                );
                , "mathjax-editing");

                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "387"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                convertImagesToLinks: false,
                noModals: false,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: null,
                bindNavPrevention: true,
                postfix: "",
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );













                 

                draft saved


                draft discarded


















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f179669%2fhow-eliminate-in-an-arbitrary-order-in-subgroup-of-a-nested-matrix%23new-answer', 'question_page');

                );

                Post as a guest






























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes








                up vote
                5
                down vote



                accepted










                One way to do this is with ArrayFlatten:



                ArrayFlatten[first]
                0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0





                share|improve this answer
























                  up vote
                  5
                  down vote



                  accepted










                  One way to do this is with ArrayFlatten:



                  ArrayFlatten[first]
                  0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0





                  share|improve this answer






















                    up vote
                    5
                    down vote



                    accepted







                    up vote
                    5
                    down vote



                    accepted






                    One way to do this is with ArrayFlatten:



                    ArrayFlatten[first]
                    0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0





                    share|improve this answer












                    One way to do this is with ArrayFlatten:



                    ArrayFlatten[first]
                    0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 8 at 5:01









                    bill s

                    50.5k373142




                    50.5k373142




















                        up vote
                        4
                        down vote













                        ArrayReshape[first, 4, 4]



                        0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0




                        Also



                        Module[x = #, x[[All, 0]] = Sequence; x[[All, All, All, 0]] = Sequence; x] &@first
                        MapAt[Sequence &, first, All, 0, All, All, All, 0]
                        ReplacePart[first, _, 0 -> Sequence, _, _, _, 0 :> Sequence]





                        share|improve this answer
























                          up vote
                          4
                          down vote













                          ArrayReshape[first, 4, 4]



                          0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0




                          Also



                          Module[x = #, x[[All, 0]] = Sequence; x[[All, All, All, 0]] = Sequence; x] &@first
                          MapAt[Sequence &, first, All, 0, All, All, All, 0]
                          ReplacePart[first, _, 0 -> Sequence, _, _, _, 0 :> Sequence]





                          share|improve this answer






















                            up vote
                            4
                            down vote










                            up vote
                            4
                            down vote









                            ArrayReshape[first, 4, 4]



                            0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0




                            Also



                            Module[x = #, x[[All, 0]] = Sequence; x[[All, All, All, 0]] = Sequence; x] &@first
                            MapAt[Sequence &, first, All, 0, All, All, All, 0]
                            ReplacePart[first, _, 0 -> Sequence, _, _, _, 0 :> Sequence]





                            share|improve this answer












                            ArrayReshape[first, 4, 4]



                            0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0




                            Also



                            Module[x = #, x[[All, 0]] = Sequence; x[[All, All, All, 0]] = Sequence; x] &@first
                            MapAt[Sequence &, first, All, 0, All, All, All, 0]
                            ReplacePart[first, _, 0 -> Sequence, _, _, _, 0 :> Sequence]






                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Aug 8 at 6:06









                            kglr

                            157k8182379




                            157k8182379




















                                up vote
                                3
                                down vote













                                Two approaches I can think of:



                                Partition[Flatten[first], 4]
                                Flatten[first, 1, 2, 3, 4]





                                share|improve this answer
























                                  up vote
                                  3
                                  down vote













                                  Two approaches I can think of:



                                  Partition[Flatten[first], 4]
                                  Flatten[first, 1, 2, 3, 4]





                                  share|improve this answer






















                                    up vote
                                    3
                                    down vote










                                    up vote
                                    3
                                    down vote









                                    Two approaches I can think of:



                                    Partition[Flatten[first], 4]
                                    Flatten[first, 1, 2, 3, 4]





                                    share|improve this answer












                                    Two approaches I can think of:



                                    Partition[Flatten[first], 4]
                                    Flatten[first, 1, 2, 3, 4]






                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Aug 8 at 4:50









                                    Αλέξανδρος Ζεγγ

                                    1,381720




                                    1,381720



























                                         

                                        draft saved


                                        draft discarded















































                                         


                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f179669%2fhow-eliminate-in-an-arbitrary-order-in-subgroup-of-a-nested-matrix%23new-answer', 'question_page');

                                        );

                                        Post as a guest













































































                                        Comments

                                        Popular posts from this blog

                                        List of Gilmore Girls characters

                                        What does second last employer means? [closed]

                                        One-line joke