Ask Your Question
0

symbolic vector norm

asked 2012-03-19 16:25:19 +0100

calc314 gravatar image

I can't get Sage to produce the norm or even just compute w[1]^2 in the code below. I keep getting a "not implemented" error. Have I made a simple mistake here, or is there a way around this? Thanks for the help. I haven't done much with matrix computations in Sage yet and am trying to learn my way around.

var('x,y')
a=matrix([[1,2],[-3,0]])
v=vector([x,y])
w=a*v.column()
w.norm()
edit retag flag offensive close merge delete

Comments

This is an error in symbolic matrices (v.column() makes w a symbolic matrix, not a symbolic vector). I've opened a ticket here: http://trac.sagemath.org/experimental/ticket/12733

Jason Grout gravatar imageJason Grout ( 2012-03-23 03:53:46 +0100 )edit
mforets gravatar imagemforets ( 2017-04-11 11:50:37 +0100 )edit

1 Answer

Sort by » oldest newest most voted
2

answered 2012-03-19 17:15:18 +0100

achrzesz gravatar image
sage: var('x,y')              
(x, y)
sage: a=matrix([[1,2],[-3,0]])
sage: v=vector([x,y])         
sage: w=a*v                   
sage: w.norm()                
sqrt(abs(x + 2*y)^2 + abs(-3*x)^2)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-03-19 16:25:19 +0100

Seen: 6,857 times

Last updated: Mar 19 '12