LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (August 2005, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 3 Aug 2005 12:47:29 -0700
Reply-To:     shiling99@YAHOO.COM
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         shiling99@YAHOO.COM
Organization: http://groups.google.com
Subject:      Re: simple IML question
Comments: To: sas-l@uga.edu
In-Reply-To:  <200508031743.j73Hhkxi008215@listserv.cc.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"

Here is the code.

proc iml;

x1={ 0.9501 0.4860 0.4565, 0.2311 0.8913 0.0185, 0.6068 0.7621 0.8214 };

x_de_mean=x1-repeat(x1[:,],nrow(x1));

print x1 x_de_mean;

quit;

HTH

Michael Murff wrote: > Hi all, > > > > proc iml; > > > > x1={ 0.9501 0.4860 0.4565, > > 0.2311 0.8913 0.0185, > > 0.6068 0.7621 0.8214 }; > > > > > > > > meanx=x1[:,]; > > > > > > /*I want to column-wise de-mean the x1 matrix as below: > > > > > > > > want = > > > > 0.3541 -0.2271 0.0243 > > -0.3649 0.1782 -0.4136 > > 0.0108 0.0490 0.3893 > > > > Thanks very much, > > > > Michael Murff


Back to: Top of message | Previous page | Main SAS-L page