How can I calculate directional vector of a line connecting two points?
6 views (last 30 days)
Show older comments
The two points are pixel position of an image
0 Comments
Answers (1)
goerk
on 19 May 2016
Startpoint = [1 2];
Endpoint = [3 3];
direction = Endpoint - Startpoint;
direction_scaled = direction/norm(direction); % vector with length 1
0 Comments
See Also
Categories
Find more on 3-D Volumetric Image Processing 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!