Use the Calculus > Vector command, press Ctrl+Shift+R, or use the VECTOR function to generate a vector of the values of an expression evaluated at a sequence of points.  The command allows you to select a variable and to enter the starting value, the ending value, and the step size.


Alternatively, an expression of the form VECTOR(u, k, n) simplifies to a vector of n elements generated by simplifying the expression u(k) with the variable k stepping from 1 through n in steps of size 1.  For example,

VECTOR(x^2, x, 5)

simplifies to

[1, 4, 9, 16, 25]


VECTOR(u, k, m, n) simplifies to a vector of n-m+1 elements generated by simplifying the expression u(k) with the variable k stepping from m through n in steps of size 1.  For example,

VECTOR(j!, j, 0, 4)

simplifies to

[1, 1, 2, 6, 24]


VECTOR(u, k, m, n, s) simplifies to a vector of (n-m)/s+1 elements, rounded down, generated by simplifying the expression u(k) with the variable k stepping from m through n in steps of size s.  For example,

VECTOR(SIN(z), z, 0, π/4, 0.2)

approximates to

[0, 0.198669, 0.389418, 0.564642]


If the third argument of VECTOR is a vector or a set, the variable ranges over the elements of the vector or set.  For example,

VECTOR(k^2, k, [2, 3, 5, 7, 11])

simplifies to the squares of the first five prime numbers

[4, 9, 25, 49, 121]


Since a matrix is just a vector of vectors, a nested call on VECTOR can be used to generate a matrix.  For example, 

VECTOR(VECTOR(j + k, k, 1, 4), j, 1, 3)

simplifies to the 3 by 4 matrix having elements equal to the sum of their indices

2  3  4  5
           
3  4  5  6
           
4  5  6  7


Note that even in case insensitive mode, the VECTOR function cannot be entered as Vector since the latter is a Reserved System NameDERIVE_Reserved_System_Names in Derive.


Other Calculus commandsCalculus_commands 

Created with the Personal Edition of HelpNDoc: Free Kindle producer