Command: Range

NEST HelpDesk Command Index NEST Quick Reference

Name:
 Range - Generate array with range of numbers
Synopsis:
  [N] Range  -> [1 ... N]
            [N1 N2] Range -> [N1 ... N2]
            [N1 N2 d] Range -> [N1 N1+d N1+2d ...]
Description:
    Range accepts an array which contains either
    1) a single integer
    2) an interval specified by two integers or two doubles
    3) an interval and a stepsize, specified by three integers or
       three doubles.

    Range generates an array with numbers which are in the specified
    range. The type of the result corresponds to the type used for
    specifying the interval.

    Range returns an empty array if the set specified by N1, N2 and d
    does not contain any element. This behavior is essential if
    Range is used in combination with functional operators like
    FoldList and NestList.

Examples:
          [5] Range    -> [1 2 3 4 5]
        [2 5] Range    -> [2 3 4 5]
        [5 2] Range    -> []
        [5 2 -1] Range -> [5 4 3 2]
        [1.0 10.0 2.5] Range -> [1 3.5 6 8.5]
Bugs:
Author:
 Gewaltig, Diesmann
Remarks:
 Resembles the function Range of Mathematica
SeeAlso:LayoutArray Table array zeros ones Map
Source:
 /home/abuild/rpmbuild/BUILD/nest-2.4.1/lib/sli/mathematica.sli

NEST HelpDesk Command Index NEST Quick Reference

© 2000-2010 The NEST Initiative