Plot a unit vector in MATLAB, given its starting point and the orientation about 3 axes
Show older comments
I have a point [x y z] and the Euler orientation angles [r p y]. How can I plot a unit vector in MATLAB starting from [x y z] in the orientation of [r p y] ?
3 Comments
Adam Danz
on 22 Nov 2019
If you're using a polarplot() you simply supply the angle and magnitude
polarplot(theta, rho) %theta is in radians
If you're plotting that in cartesian coordinates, convert (theta,rho) to (x,y) using,
[x,y] = pol2cart(theta,rho)
Check out the documentation for pol2cart for input requirements.
crisdeodates
on 22 Nov 2019
Ah, right. Then sph2cart() would be more useful
This link looks promising, too
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!