Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'A loop without re-generating random variates of...' topicStudent Support Forum > General > Archives > "A loop without re-generating random variates of..."

Next Comment >Help | Reply To Topic
Author Comment/Response
Adam Kustka
08/01/12 09:58am

Hi,
Iíd like to run an evaluation say, 1000 times, on a notebook which computes a value based on random numbers from a standard normalized population. Iíve figured out using OpenAppend, Write and Close to collect the data in a spreadsheet but canít figure out how to loop the calculation. Iíve read up on Do and Loops. It seems Do is not the right command here, since Do works on pre-defined expressions rather than ones that Iíve created and defined once. I hope I can articulate this clearly.. If I try to concatenate all of my expressions to calculate the value of interest in a Do function, every time the expression Table[RandomVariate[NormalDistribution[0,1]],{<row number>}] is entered, a new set of standard normal distribution numbers will be generated. I need the calculated value to draw on the same set of random variates of from the standard normal population.
When I define this, as RSND= Table[RandomVariate[NormalDistribution[0,1]],{67}] (67 is my row number in this case), Do does not seem to recognize my definition.

This might be naÔve, and further reveal that Iím a bit newÖ but is there a way to simply ask Mathematica to go to line 50 (for example) and repeat the analysis x times? I hate asking questions that are probably simple to many but I have been trying to get this to work for several days. Thanks for your help!!


URL: ,

Subject (listing for 'A loop without re-generating random variates of...')
Author Date Posted
A loop without re-generating random variates of... Adam Kustka 08/01/12 09:58am
Re: A loop without re-generating random variate... Bill Simpson 08/02/12 00:42am
Please disregard my last comment .. Adam Kustka 08/02/12 2:58pm
Next Comment >Help | Reply To Topic