From: Gunter K. <gu...@pe...> - 2019-03-05 16:28:35
|
My guess (it's only a guess: I don't have your build_info() and am on my phone) is that you get a 1-column-wide matrix that is printed as a list of lists. You can transpose your matrix before printing it and only print x[1] which would be the first row of this 1-row matrix. Kind regards, Gunter. Am 5. März 2019 16:50:15 MEZ schrieb Ronald Modesitt <ron...@gm...>: >I write a line of code such as > m1: col(M,1), >where M is a matrix of integer values (951 x 6) and '1' is the column >of M >that I wish to extract. I am expecting that m1 will be a column matrix. >However it appears to me that what is returned is a column matrix of >matrices. > > m1 = [ > [] > [] > . > . > . > [] > [] > [] > ] > >my actual code is: >c1: zeromatrix(75,1)$ >m1:col(M,1)$ >lm: length(M)$ >for i: 1 step 1 thru lm do > (x: m1[i], > print("x= ",x), > c1[x]: c1[x]+1)$ > >the resulting error message is: > >x= [65] >apply: subscript must be an integer; found: [65] > -- an error. To debug this try: debugmode(true); > >Am I misinterpreting the syntax of col(M,i) or misusing it altogether? > >Thanks > >Ron -- Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet. |