List Parameters |
Top Previous Next |
List parameters define a list of values that the parameter can be selected from. You must list out every value. Lists are very useful when you have a known number of options that do not follow a specific pattern. For example, you might use a list to list out the standard television sizes.
Lists can also list out strings which allows you to change words in an equation.
List parameters are defined using the list command.
$p=list(value1,value2,value3,...)
Examples:
$p=list(2,3,5,7,11,13,17,100) $p can be any of the listed values. $q=list(0,pi/4,pi/2,3pi/4,pi) $q can be any of the listed values (inserted as decimals). $r=list("red","green","blue") $r can be any of the listed strings. |