Question: Assigning vector of symbols

Hey,


I want to assign a value to a symbol stored in a vector. I know the position of the symbol in the vector. Is there an easy way to do this?

Here to illsutrate my problem:

> 

restart:

> 

vec:=<a,b,c>:

> 

vec(1):=1;    # expected result: a:=1

vec := Vector(3, {(1) = 1, (2) = b, (3) = c})

(1)
> 

a;            # expected result: 1

a

(2)
> 

 

 

Download point_to_element.mw

 

 

Please Wait...