Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Problem with loops' topicStudent Support Forum > General > Archives > "Problem with loops"

Help | Reply To Topic
Author Comment/Response
07/27/04 07:20am

Hi all,

I am trying to work out the value of S at different nodes in a binomial tree, using the following formula:

Table[S u^j d^(n - j)p^j q^(n - j), {j, 0, n}]

I would like to loop this in some way so that I don't have to assign new values to n all the time (S, d, p, q are given). I have tried For and Do, but when i print the result, Mathematica produces n lists that are equal to the final value of n, and not for n=0,1,..., n-1.

Anyone who could help me with this?

URL: ,
Help | Reply To Topic