Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: mata matrix permutation
From
yoad shefi <[email protected]>
To
statalist <[email protected]>
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
<[email protected]> 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 <[email protected]>:
>> 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/