Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | yoad shefi <yshefi9@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: mata matrix permutation |
Date | Mon, 17 Feb 2014 11:43:25 -0600 |
Thank You! On Mon, Feb 17, 2014 at 10:36 AM, Christophe Kolodziejczyk <ck.statalist@gmail.com> wrote: > and (now I realize that) it can be done in one line > > c = vec(rowshape(a,3))' > > > > > 2014-02-17 3:48 GMT+01:00 yoad shefi <yshefi9@gmail.com>: >> I have a matrix in mata that has 3000 columns, but consists of 3 >> distinct blocks (each with 1000 columns). >> I'm trying to change the order of the columns so that I get a >> consecutive set of columns one from each block - 1, 1001, 2001, 2, >> 1002, 2002, 3, 1003, 2003 ....., 999,1999,2999, 1000, 2000, 3000. >> >> Is there an easy way to do this in mata? >> >> any help would be appreciated, >> >> Thanks, >> Yoad >> * >> * For searches and help try: >> * http://www.stata.com/help.cgi?search >> * http://www.stata.com/support/faqs/resources/statalist-faq/ >> * http://www.ats.ucla.edu/stat/stata/ > > > > -- > Christophe Kolodziejczyk > Research Fellow > > AKF, Anvendt KommunalForskning > Danish Institute of Governmental Research > Købmagergade 22 > DK-1150 København K > > * > * For searches and help try: > * http://www.stata.com/help.cgi?search > * http://www.stata.com/support/faqs/resources/statalist-faq/ > * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/