#!F-adobe-helvetica-medium-r-normal--18* #!N #!CDarkGreen #!N #!Rlists1 Lists #!N #!EC #!N #!N Unlike the vector, matrix, and tensor constructions that aggregate several lower dimensional data elements into a single higher one; the #!F-adobe-times-medium-i-normal--18* list #!EF construction collects several homogeneous elements together so that they can be handled as a single entity while still retaining their individuality. #!N #!N Lists are constructed by enclosing a sequence of scalars, vectors, matrices, rank #!F-adobe-times-medium-i-normal--18* n #!EF tensors, or string constants in braces ( #!F-adobe-times-bold-r-normal--18* { } #!EF ). The elements of a list can be separated by commas, although they need not be. In Data Explorer, a list is the same as an Array (see #!Larrays,dxall252 h Arrays #!EL ). #!N #!N The following are examples of valid lists: #!N #!N #!CForestGreen #!N #!F-adobe-courier-bold-r-normal--18* #!N {1.0 2.0 3.0} // 3 scalar values (for isovalues) #!N #!N {[0.0 0.0 0.0], // 4 vector values for use as #!N [1.0 0.0 0.0], // streamline seed points #!N [2.0 0.0 0.0], #!N [3.0 0.0 0.0]} #!N #!N #!N #!N { "a" "list" "of" "string" #!N "constants"} #!EF #!N #!N #!EC #!N #!N Lists of scalars can also be defined with a convenient shorthand notation that specifies the following: #!N #!I0 #!N #!F-adobe-times-medium-r-normal--18* #!N #!N #!I30 #!N o The list's starting value #!N #!I30 #!N o The list's ending value #!N #!I30 #!N o A #!F-adobe-times-medium-i-normal--18* stepping increment #!EF (optional). #!N #!I0 #!N #!EF #!N If you do not specify a stepping increment, then the default is 1. If any of the values in the list constructor (including the stepping increment) are specified as floating point numbers, then the generated list contains floating-point numbers; otherwise, it contains integers. If the starting value is smaller than the ending value, the list elements are generated in increasing order; otherwise they are generated in decreasing order. Also, only the magnitude of the stepping increment is important, not the sign. A negative stepping increment produces the same results as a positive one. #!N #!N The values included in the list are generated by continually adding the value of the stepping increment to the starting value until the resultant value passes the ending value. Each of the following produces the same list: #!N #!N #!CForestGreen #!N #!F-adobe-courier-bold-r-normal--18* #!N {-1 1 3 5 7 9} #!N {-1 .. 9 : 2} #!N {-1 .. 9 : -2} #!N {-1 .. 10 : 2} #!EF #!N #!N #!EC #!N Note: Spaces are required around the .. operator. #!N #!N #!N Lists specified using this notation will be represented as a #!F-adobe-times-medium-i-normal--18* Regular Array #!EF of 1-vectors. See #!Larrays,dxall252 h Arrays #!EL for a discussion of Array types. #!N #!N #!N #!F-adobe-times-medium-i-normal--18* Next Topic #!EF #!N #!N #!Lbld,dxall531 h Building Expressions and Statements #!EL #!N #!F-adobe-times-medium-i-normal--18* #!N
Generated by dwww version 1.15 on Sat Jun 22 12:48:19 CEST 2024.