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

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
01/22/13 1:21pm

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[t<tST, j = Cos[tST], j = Cos[t]]; If[t>Pi-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.

URL: ,

Subject (listing for 'extracting data from DO loop to create table')
Author Date Posted
extracting data from DO loop to create table Omid 01/22/13 06:38am
Re: extracting data from DO loop to create table Bill Simpson 01/22/13 1:21pm
< Previous CommentHelp | Reply To Comment | Reply To Topic