Skip to content

Example 1: Random numbers between [0,1)

Yuji Sode edited this page Jan 14, 2018 · 1 revision

Random numbers between [0,1)

Script

#10 sets of 1000 random variables
source randFreq.tcl;
source randomProc.tcl;
set L [rands 10 1000];
::randFreq::outputFreq $L ,;
#=== frequency class range ===
#between 0.0 and 1.0 with step 0.01

randomProc.tcl

Output file: 1515389994dataFreq.txt

10_datasets
variables,averages,standard_deviations
0.0000,10.3,3.529242915351047
0.0100,10.0,4.109609335312651
0.0200,11.4,2.716206504995115
...
0.9800,10.1,2.6436506745197805
0.9900,8.9,3.0349812373573433
1.0000,0.0,0.0

Output results shown in a graph

1515389994datafreq_graph01