|
APL Symbol Reference A{drop}B returns a copy of vector B without the first A (if A>0) or last A (if A<0) elements. If B is a matrix, A is must be two numbers, with A[1] giving the number of rows and A[2] giving the number of columns to drop. A{take}B returns the first A (if A>0) or last A (if A<0) elements of a vector B. If B is a matrix, A is must be two numbers, with A[1] giving the number of rows and A[2] giving the number of columns to return. A{membership}B returns a Boolean array having the same shape as A. Ones in the result mark elements of A that occur in B; zeros mark elements that don't occur in B. {gradeup}B returns a permutation vector that describes how to arrange the elements of a numeric vector B in ascending order. The expression B[{gradeup}B] can be used to obtain a sorted copy of B. {transpose}B returns the transpose of a matrix B. (It flips the matrix across the main diagonal, so the first row becomes the first column.) More generally, transpose reverses the order of the dimensions in B. Consequently, it has no effect on vectors or scalars. {quotequad} is used for character input and output. Assigning a value to {quotequad}, as in {quotequad}{<-}B, causes the value of B to be displayed (without a carriage return being appended at the end). Referencing {quotequad}, as in Z{<-}{quotequad}, causes a line of character input to be read from the user. {ln}B returns the natural log of B. A{log}B returns the base-A log of B. {floor}B returns the largest integer that is less than or equal to B. (For positive numbers, this is usually the integer part of B.) {ceiling}B returns the smallest integer that is greater than or equal to B. (For positive numbers, this rounds B up to the next higher integer.) JimW's Home Page |