Defining a Range Variable

Iterative processes in Mathcad worksheets depend on range variables.

Tutorial - Defining Variables

Discussion and Example

To define a range variable:

  1. Type the name of the variable followed by a colon (:), to create a definition.
  2. In the placeholder, type the first number in the sequence of values.
  3. Type a comma, or, if you're defining a sequence in increments of one, go to step 5.
  4. Type the second number in the sequence.
  5. Type a semicolon (;). Note that it appears as two dots ".."
  6. In the remaining placeholder, type the last number in the sequence.

1..20

gives the range

1, 2, 3 ... 20

20..1

gives the range

20, 19, 18 ... 1

1,1.1..5

gives the range

1, 1.1, 1.2 ...5

5,3..-7

gives the range

5, 3, 1, -1 ...-7

Notes:

Related Topics