Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Maarten buis <maartenbuis@yahoo.co.uk> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Matrix manipulation |
Date | Wed, 23 Mar 2011 09:51:48 +0000 (GMT) |
--- On Wed, 23/3/11, u.atz@lse.ac.uk wrote: > I have a short question working with matrices in Stata (not > Mata - perhaps would be more advisable): > > I'd like to divide each row by the respective entry in the > first column of any nxk matrix. Yes it is very much more advisable to do this in Mata: *------------- begin example ------------ mata a = 80, 100, 40 \ 10, -6, 7 c = 80 \ 10 a :/ c end *-------------- end example ------------- Hope this helps, Maarten -------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://www.maartenbuis.nl -------------------------- * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/