Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Fun with matrices...


From   "Michael Blasnik" <[email protected]>
To   <[email protected]>
Subject   st: Re: Fun with matrices...
Date   Mon, 6 Dec 2004 09:54:49 -0500

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/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index