getinterval


Name:
getinterval - Return a subsequence of a string or array.
Synopsis:
(string1) a b getinterval -> (string2)  
[array1] a b getinterval -> [array2]
Examples:
(spiketrainsimulation) 5 5 getinterval -> train  
(spiketrainsimulation) 0 5 getinterval -> spike
[23 24 25 26 27 30] 0 2 getinterval -> [23 24]
[23 24 25 26 27 30] 2 3 getinterval -> [25 26 27]
[23 24 25 26 27 30] 0 6 getinterval -> [Error]: RangeCheck
Description:
 
getinterval returns a new container with b elements
starting at element a
Note that getinterval can only handle indices from 0 to N-1
where N is the length of the original array

If other values are given (i.e. indices which do not exist in the array), the
function throws a RangeCheckError

If negative values are given, getinterval throws a PostiveIntegerExpectedError

If b = 0, getinterval returns an empty array

Author:
docu edited by Sirko Straube  
SeeAlso: Source:
/home/nest/work/nest-2.14.0/sli/slidata.cc