How do I plot points with a certain direction and length?

1 view (last 30 days)
Specifically I have a velocity a function that gives velocities in the x and y direction and I would like the direction of this velocity to always be heading at 45 degrees. And the direction arrow would be 2x the length of the magnitude of the velocity.
Any help on how to do this would be much appreciated
  1 Comment
Image Analyst
Image Analyst on 29 Apr 2015
Well, what if your function does not give velocities in the 45 degree direction? What then? Are you 100% sure it will give velocities in that direction? What if it gives 44.999999 degrees or 45.000000001 degrees? See the FAQ: http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!