LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (September 1997, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 1 Sep 1997 19:50:52 PDT
Reply-To:     TWB2%Rates%FAR@bangate.pge.com
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Tim Berryhill 3rd time <TWB2%Rates%FAR@BANGATE.PGE.COM>
Subject:      Re: lower triangle
Comments: To: aam22@city.ac.uk

It looks to me as if the second marked line should be VARS(J)=DAT(COUNT); rather than VARS(I)... ----------------------[Reply - Original Message]----------------------

Sent by:"A.A.Mcculloch" <aam22@CITY.AC.UK> Hi, I'm trying to produce a 32*32 lower triangular matrix from its 528 members read in as a single record. I store the data in array dat and have 2 nested loops to get the correct sequence in the matrix. The problem is with the variable count that does not increment as I expected.

array dat(*) v1-v528 ; array vars(*) var1-var32 ;

keep var1-var32 ;

count = 0 ;

do i = 1 to 32 ; do j = 1 to i ;

******* count = count + 1 ; ********** ******* vars(i) = dat(count) ; **********

end ; output ; end ;

run ;

proc print ; run ;

yours sincerely Andrew McCulloch

=====================================================================


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