How to assign values to variables



Hi Stavros,

Stavros Macrakis wrote:

>     great ! that suits me perfectly, at least until I found a "higher
>     level" way
>
>
> It is not clear to me what you are trying to do.
>
> Depending on what your goal is, you might want to simply assign the 
> whole matrix, e.g.
>
>        U: Fm$

I do not want to re-assign the matrix U, I want a way to assign an 
expression to a symbol, at a layer that permits
to write a function like :

assign(var1,var2); so that at the end, value of var2 is assigned to the
symbol passed to var1 so if I enter :
bar:5;
foo:cos(x);
bar; -> 5
assign(bar,foo);
bar; -> cos(x)

that is it.
Thanks

paul

>
> This does not modify the elements of U; it just assigns a different 
> value to U.  Note that after this assignment, both U and Fm hold *the 
> same* matrix, so if you modify one, you modify the other.
>
>           -s
>