Notifications
Clear all
[Closed] simple question about create random data
Mar 29, 2009 3:18 pm
I want create a dat file with random function (random point3)
and I want the number be big enough : 44 sets and every set have 500 position values
the following is my plan
for i =1 to 44 do
(
for i=1 to 500 do
(
random [num,num,num] [num,num,num] –is this enough??
)
)
create file –dont know how to realize
write data to the file –dont know how to realize
so much I can think of , need help to full of it
many thanks
2 Replies
Mar 29, 2009 3:18 pm
try this, if you want your random data float then use a=1.0 b=1000.0
function writeout = (
a=1
b=1000
extfile = createfile "d:/randomdata.dat"
for i= 1 to 44 do (
format "set %
" i to:extfile
for k=1 to 500 do (
format "% % %
" (random a b) (random a b) (random a b) to:extfile
)
format "end set %
" i to:extfile
format "
" i to:extfile
)
close extfile
)
writeout()