Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

built in method norm of Vector_symbolic_dense object

So, I want to write a program that plots equipotential contours for z=0 for electric potential of 3 charges(ch) at specified coordinates(matrix m). I need rv to be a vector with general coordinates so I can later plot the equipotential contours.

var(' x y ')
m=matrix(QQ,[[1,1],[-1,-1],[-1,1]])
ch=([-1,1,1])
rv=vector([x,y])
k=rnaboja.nrows();
u=[(rv-m[i]).norm() for i in range(k)];

However, after the last line I get this:

[<built in method norm of Vector_symbolic_dense object at 0xbb752fc>, <built in method norm of Vector_symbolic_dense object at 0xbb7532c>, <built in method norm of Vector_symbolic_dense object at 0xbb750bc>]

How do I fix this to get the norm of rv-m[i]?

,

built in method norm of Vector_symbolic_dense object

So, I want to write a program that plots equipotential contours for z=0 for electric potential of 3 charges(ch) at specified coordinates(matrix m). I need rv to be a vector with general coordinates so I can later plot the equipotential contours.

var(' x y ')
m=matrix(QQ,[[1,1],[-1,-1],[-1,1]])
ch=([-1,1,1])
rv=vector([x,y])
k=rnaboja.nrows();
k=m.nrows();
u=[(rv-m[i]).norm() for i in range(k)];

However, after the last line I get this:

[<built in method norm of Vector_symbolic_dense object at 0xbb752fc>, <built in method norm of Vector_symbolic_dense object at 0xbb7532c>, <built in method norm of Vector_symbolic_dense object at 0xbb750bc>]

How do I fix this to get the norm of rv-m[i]?

,

built in method norm of Vector_symbolic_dense object

So, I want to write a program that plots equipotential contours for z=0 for electric potential of 3 charges(ch) at specified coordinates(matrix m). I need rv to be a vector with general coordinates so I can later plot the equipotential contours.

var(' x y ')
m=matrix(QQ,[[1,1],[-1,-1],[-1,1]])
ch=([-1,1,1])
rv=vector([x,y])
k=m.nrows();
u=[(rv-m[i]).norm() for i in range(k)];

However, after the last line I get this:

[<built in method norm of Vector_symbolic_dense object at 0xbb752fc>, <built in method norm of Vector_symbolic_dense object at 0xbb7532c>, <built in method norm of Vector_symbolic_dense object at 0xbb750bc>]

How do I fix this to get the norm of rv-m[i]?

,