MATLAB Answers

How can I create random Co-ordinate shifts (x,y,z) that add to a displacement of 1?

2 views (last 30 days)
Hannah Taylor
Hannah Taylor on 30 Mar 2020
Commented: Hannah Taylor on 30 Mar 2020
I have a set of co-ordiantes with x, y and z values. I'm trying to shift the co-ordiantes randomly to produce an overall shift of 1 (mm).
I know that if i'm shifting x y and z by random amounts of a b and c respectively, then:
sqrt(a^2 + b^2 + c^2) = 1
How can I randomly produce a vector (a, b, c) that satisfies the above equation?
Thanks!!

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.