Div2 Function

Div2 divides all values in a list by each value in the other list


Function

The Div2 function is used to divide two lists. Each element of the first list is divided by each element of the second list. The result is a table. The size of the table corresponds to the lengths of the list a * list b.

For a simple calculation, the expression x = Div2 (a, b) is identical to x [] = a / b .

For more complex expressions with more than two lists in the arguments, the Div2 function be required. The differences are shown below.

Available from version 7.12


Syntax

Div2 (a, b)

Examples



In the following example, each element of the Div2 (a, b) result is added to each line of c .
The result is a table with 3 lines.



In the following example, each element of a is divided by each element of b . Then each element of the resulting table is added to each element of c . The result is a three-dimensional data field. The index display shows three consecutive tables.

Practical example

In the following example, the resonance frequency is calculated from three different capacitances C and inductances L. The result is a table containing the results of all possible combinations.