Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Iteration Help' topicStudent Support Forum > General > "Iteration Help"

Next Comment >Help | Reply To Topic
Author Comment/Response
09/16/11 2:18pm

Hello all. I am using the table command to iterate over two parameters using i and j as my iterative operators. At the end of some equation solutions I come up with a single number that is the answer for that particular iteration. My goal is to be able to plot this in a 3-diminsional form in the following manner: x axis: value of i, y axis value of j, z axis: value returned from that particular iteration. I was trying to make use of the Array command so tableOUT=Array[1, {2, 10}] (2 iterations in i and 10 in j). Then at the end of my table code I've been using tableOUT[[i]]={answer, i, j}. This works great but of course the obvious problem is it only saves as the last iteration of j for i=1 and i=2. so where I should have a 2x10 matrix of unique triplets I end up with a 2x1 matrix. Hope this is clear enough, I have attached an example program.

Attachment: example.nb, URL: ,

Subject (listing for 'Iteration Help')
Author Date Posted
Iteration Help Derek 09/16/11 2:18pm
Re: Iteration Help yehuda ben-s... 09/20/11 09:04am
Next Comment >Help | Reply To Topic