Ask Your Question

nardaen's profile - activity

2016-07-26 18:47:56 +0200 received badge  Popular Question (source)
2016-07-26 18:47:56 +0200 received badge  Notable Question (source)
2016-07-26 18:47:56 +0200 received badge  Famous Question (source)
2015-03-07 22:57:24 +0200 received badge  Editor (source)
2015-03-07 22:43:41 +0200 asked a question How do I create and plot a vector from the difference between two points?

Having points $a$ and $b$, how do I create a vector that goes from $a$ to $b$? I'm trying the following but I get an error:

a=[(1,0,0)]
b=[(0,-1,0)]
u=vector(b-a)

Then, how do I plot $a$, $b$ and $u$ at the position of $a$? The error is

File "/tmp/tmpoTA_jw/___code___.py", line 6, in <module> exec compile(u'u=vector(b-a) File "", line 1, in <module> TypeError: unsupported operand type(s) for -: 'list' and 'list'