First time here? Check out the FAQ!
answered 2016-10-11 18:00:45 +0100
May be you can achieve what you want via an anonymous function.
a,b=var('a,b') M = lambda a,b : matrix([[1,a], [0,b]]) A = M(a,b) show(A) B = M(a=0,b=b) show(B)