On Mon, 31 Oct 2011 at 03:09PM -0700, Chappman wrote:
> Hi folks, I am relatively new to programming in Sagemath, and I am
> trying
> to find a method in of creating a n x n array, with probabilities as
> the entries of this array .

Use a matrix, or even simpler, a list of lists.

    sage: m = matrix(3, [[1, 2, 3], [4,5,6], [7,8,9]])

> Here's the tricky part, then I have to create a coding program which
> uses the values in this array.
> 
>  For i=1 to 5;
>        For j=1 to i-1;
>           total_prob= (some type of simple formula which refers back
> to entries in the array)
>        end;
> end;

It looks like you're just reassigning total_prob again and again. Is
that what you want?

Dan

--
---  Dan Drake
-----  http://mathsci.kaist.ac.kr/~drake
-------

Attachment: signature.asc
Description: Digital signature

Reply via email to