Command: Table

NEST HelpDesk Command Index NEST Quick Reference

Name:
 Table - Generate an array according to a given function
Synopsis:
  [N]       {f} Table  -> [f(1) ... f(N)]
            [N1 N2]   {f} Table  -> [f(N1) ...f(N2)]
            [N1 N2 d] {f} Table -> [ f(N1) f(N1+d) f(N1+2d) ...]
Description:
    Table accepts an array which contains either
    1) a single integer
    2) in interval specified by two integers or two doubles
    3) an interval and a stepsize, specified by three integers or
       three doubles.
    and a procedure object which is to be applied. From the
    interval specification an array of numbers is generated, using Range.
    The supplied procedure is the applied to each number in the array.

Examples:
          [5] {2 mul} Table  -> [2 4 6 8 10]
        [2 5] {2 mul} Table  -> [4 6 8 10]
        [1.0 10.0 2.5] {2 mul} Table  -> [2.0 7.0 12.0 17.0]
Bugs:
Author:
 Gewaltig
Remarks:
 Resembles the function Table of Mathematica
References:
SeeAlso:Map MapIndexed Range LayoutArray array forall forallindexed
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