Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Problem with code for List' topicStudent Support Forum > General > "Problem with code for List"

< Previous CommentHelp | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
12/20/12 10:02pm

If I understand what you are trying to do then in your second ListPlot you give it a list, in almost exactly the same way that you gave your first ListPlot a list. To create a list you use Table. For[] does not create a list, it just repeats a calculation over and over and discards the result of each calculation unless you specifically do something to save that.

Perhaps something like this will help

Fdlist[n_, a_, A_, K_, L_] := Table[A K^a L^(1 - a), {i, 0, n - 1}];
ListPlot[Fdlist[1000, .5, 2, 5, 5], Joined->True, Frame->True, PlotLabel->"Test"]

Now you just have to determine what the calculation is for each element of that list.

URL: ,

Subject (listing for 'Problem with code for List')
Author Date Posted
Problem with code for List May 12/19/12 8:05pm
Re: Problem with code for List Bill Simpson 12/20/12 10:02pm
< Previous CommentHelp | Reply To Comment | Reply To Topic