| TUdataStat | TCL UTILITIES USER MANUAL | TUdataStat |
|---|
| set |
[TUdataStat  |
D
|
| D | - | Input data array |
| nE | - | The number elements to process. The last data array element processed is (nE - 1) * Skip + Off. |
| Skip | - | Optional increment value to use when getting the next value in the data array. Default is 1. |
| Off | - | Optional offset into the data array. Processing starts at this element. Default is 0. |
| rV | - | List containing the average and varience of the input data array. |
# FIND the average and varience in a random data set.
#
# FORM a random data set positive and negative numbers from -1 to 1
TUdataRnd1 V 1000 PN
# DETERMINE the average and varience in the dataset
set rV [TUdataStat V 1000 ]
# PRINT results
puts stderr "AVERAGE VALUE : [format "%.3f" [lindex $rV 0]]"
puts stderr "VARIENCE : [format "%.3f" [lindex $rV 1]]"
AVERAGE VALUE : 0.014
VARIENCE : 0.345
| Sept 19, 2006 |
|---|