Perfect.
I try it and it works fine.
Amadou.
"Michael Blasnik"
<michael.blasnik@verizon. To: <[email protected]>
net> cc:
Sent by: Subject: st: Re: Fun with matrices...
owner-statalist@hsphsun2.
harvard.edu
12/06/2004 09:54 AM
Please respond to
statalist
I think you should just read the help or manual (help matrix extract will
get you there). You need to specify two arguments to extract part of a
matrix, the rows and the columns.
mat N=M[2...,.]
where ... means and all the rest and . means all.
Michael Blasnik
[email protected]
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Monday, December 06, 2004 9:38 AM
Subject: st: Fun with matrices...
> Hi,
> Could someone tell me how to extract a sub-matrice from another one?
>
> I have (omitting brakets):
>
> 0 0 0 0 0
> M = 1 2 3 4 5
> 6 7 8 9 10
>
> I want to suppress the first line (zeros).
>
> I look into the programming book but it is not working.
>
> mat N = M[2...]
>
> And keep getting :
>
> M not found.
>
> I've also tried
> mat N = M[2,*]
>
> Thanks for helping.
> Amadou.
>
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/