Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'manipulating elements of a list' topicStudent Support Forum > General > Archives > "manipulating elements of a list"

Help | Reply To Topic
Author Comment/Response
BoB
02/25/03 3:05pm

I would like to perform a function on list that depends on the other elements of the list. For example:

list = {0,1,1,1,1}
These are the concentrations of an electroactive species being electrolyzed at a surface. Each element of the list represents a box in the diffusion layer. The species will diffuse towards the surface (at element 0) such that:

list[x] = list[x] + D(list[x+1] -2*list[x] + list[x-1])

(D is a diffusion coefficient, if it is 0.5 then the next iteration of list would be:)

list = {0,.5,1,1,1}

Note that separate functions are applied to the first and last elements of the list, but I'll deal with that later.

Thanks

BoB

URL: ,
Help | Reply To Topic