
Page 8-4
Addition of a single number to a list produces a list augmented by the
number, and not an addition of the single number to each element in the list.
For example:
Subtraction, multiplication, and division of lists of numbers of the same length
produce a list of the same length with term-by-term operations. Examples:
The division L4/L3 will produce an infinity entry because one of the elements
in L3 is zero:
If the lists involved in the operation have different lengths, an error message is
produced (Error: Invalid Dimension).
The plus sign (
+
), when applied to lists, acts a
concatenation
operator,
putting together the two lists, rather than adding them term-by-term. For
example:
In order to produce term-by-term addition of two lists of the same length, we
need to use operator ADD. This operator can be loaded by using the function
catalog (
‚N
). The screen below shows an application of ADD to add
lists L1 and L2, term-by-term: