You can also enter APL expressions, using a very limited set of keywords:
iota | iota N generates a vector of the first N integers (in origin 1) |
rho | 3 5 rho {values} generates a 3 rows by 5 columns matrix with the specified values |
times | {array1} times {array2} multiplies any array {array1} by array {array2} |
div | {array1} div {array2} divides any array {array1} by array {array2} |
power | {array1} power {array2} elevates any array {array1} to the powers specified in array {array2} |
log | log {array1} computes the logarithm of elements in {array1} |
log10 | log10 {array1} computes the base 10 logarithm of elements in {array1} |
exp | exp {array1} computes number e to the power of elements in {array1} |
Note the following rules:
- when a keyword accepts 2 array arguments, they must conform in rank and dimensions or one of them must be a single value
- the above keywords work on all supplied elements, hence: 10 2 4 times 2 5 4 returns: 20 10 16
- to build a 2-column matrix, enter values for the first column, then type: ,[1.5] then enter values for the second column (example: 1 2 3,[1.5]4 5 6)
- remember that you can paste lists of numbers from another software
- you can use any APL primitive or operator which is an ASCII character (example: ,!?*=+-<>), use parenthesis, brackets, ...
For example, the expression: ?iota 100 generates 100 random numbers each one being between 1 and the Nth value in iota 100
Or, the expression: (iota 10),[1.5]?10 rho 100 generates a 2 column matrix with the first 10 integers in column 1 and random numbers between 1 and 100 in column 2
Or, the expression: log iota 100 generates a vector with the natural logarithm of the first 100 integers
Have fun!