Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > "extracting data from DO loop to create table"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:1+3 =



Original Message (ID '273162') By Bill Simpson:
I'm not certain I understand your code. This Table[ Print[ListPlot[ Table[ v = x-1; n = 1/x^2; s = v*n; o = m+s*j; tST = ArcSin[1/x]; If[tPi-tST, j = 0]; {t, q - o + 1}, {t, 0, Pi, Pi/50} ] ]], {x, 1, 10, 1} ] tries to create ten ListPlot for you, but m and q have never been assigned any value and you get an empty plot. If you can change that code so that m and q are updated inside each iteration then you might have the plots you desire Note: Mathematica uses {} and , and ; differently from some other programming languages. ; sort of glues two statements together making Mathematica treat them as a single statement. , separates items in a list or parameters in a function call, and almost everything can be thought of as a function call, even If[] is a function, but some functions return nothing useful.