Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Problem with a double loop' topicStudent Support Forum > General > "Problem with a double loop"

Next Comment >Help | Reply To Topic
Author Comment/Response
Sune Gaulshoj
10/18/07 09:46am

Hi,

I have a Loop by use of the For function, which runs 10,000 times.

Within the Loop I have another Loop by use of For which runs 1000 times, this loop return a simple Monte Carlo value that is needed for the primary loop but it changes everytime the primary loop runs.

My problem is that I can only make the primary loop work if I leave out the inner loop. If I run the inner loop i runs 1000 times and returns the needed parameter, however, the primary loop stops after 1 run and does not keep running 10,000 times. If I leave out the inner loop the primary runs 10,000 times without any snags..

Any suggestions as to what the problem can be?

Am I not allowed to use embedded For/loop commands in Mathematica?

URL: Gaulshoj@gmail.com,

Subject (listing for 'Problem with a double loop')
Author Date Posted
Problem with a double loop Sune Gaulshoj 10/18/07 09:46am
Re: Problem with a double loop yehuda ben-s... 10/18/07 5:05pm
Re: Problem with a double loop Peter Pein 10/22/07 2:25pm
Next Comment >Help | Reply To Topic