Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

assign variable value

Hi!

I'm just getting started with Sage and therefore my question may sound really stupid (and nevertheless I couldn't find an answer here). I have a matrix with both symbolic entries and numerical values, let's say:

a,b=var('a,b')    
M=matrix([[1,a], [0,b]])

Now I want do assign a value to a:

a=0

However if I print M to the screen it still says a in the matrix and not 0.

You can clearly see that I'm really not used to Sage, so what's the problem here? What should I do if I want to assign a fixed value to a variable which is also used in the calculations where this variable appears?

Thank's for the answers, I know this will sound highly trivial for you!

Philipp