POWER baseVector powerVector resultVariable

Replaces the contents of the result variable with one element for each element in the first input vector raised to the power of the corresponding element in the second input vector.

If the input vectors are of different lengths, the shorter vector will be "extended" to the length of the longer by repeating its last element as many times as necessary. This extension is only done internally and does not change the actual size or content of the shorter vector.

If either input vector contains "Missing" values (represented by a "." or "NaN") the result for that position will also be NaN.

COPY (2 3 4 5) a
COPY (2 3) b
POWER a b c
PRINT a b c

The above program produces the following output:

a: (2.0 3.0 4.0 5.0)
b: (2.0 3.0)
c: (4.0 27.0 64.0 125.0)

Note that the size of B is unchanged.