I have a 3XN
matrix representing a list of three-dimensional coordinates, something like
33 33 33 33 34 34 34 34 34 35 35 17 18 19 20 16 17 18 19 20 16 17 10 10 10 10 10 10 10 10 10 10 10
I want to shift all coordinates by some vector v=[1 2 3]
, which adds a three-dimensional vector to each column of the matrix.
I know how to do this with a for
loop, but how can I do this without a loop? Of course there is a way ...
source share