Hi all again!
I want to checkout the outputs of this function, and so it would be faster if i add it code to print to file. But how?
VB Code:
For i = 1 To 186 ts = 18.61586 * (-Log(Rnd())) ^ (1 / 1.459292926) + 4.666839 Next i
Thanks
Printable View
Hi all again!
I want to checkout the outputs of this function, and so it would be faster if i add it code to print to file. But how?
VB Code:
For i = 1 To 186 ts = 18.61586 * (-Log(Rnd())) ^ (1 / 1.459292926) + 4.666839 Next i
Thanks
Why is it in a loop but I cannot find the "i" being used?
i want to checkout the first 186 elements, sorry i meant ts(i)
What do you mean by checkout?
the results must follow a weibull distribution, so i need to collect them to see if they really follow that distribution
This will print the results to a file. You may want to format the result before you print it, or change the filename or location.
VB Code:
option explicit sub form_load() randomize Dim ff as insteger, ts as long ff=freefile open "C:\info.txt" for output as #ff For i = 1 To 186 ts = 18.61586 * (-Log(Rnd())) ^ (1 / 1.459292926) + 4.666839 print #ff, ts Next i close #ff end sub
Thanks once more David