Thursday 15 August 2013

Check if unit vector lies in between two other unit vectors using MATLAB -



Check if unit vector lies in between two other unit vectors using MATLAB -

i've got 2 unit vectors (one perpendicular other). how can check using matlab if other unit vector have lies between these 2 unit vectors?

i have tried sing dot product, gives false positive when 3rd unit vector within same angle on other side of it.

thanks

lets have 2 unit vectors a , b, xyz axes ( specific case vectors x=a , y=b perpendicular , nil happens in z) specify quadrants:

+a+b, -a+b, -a-b, +a-b.

now assume "lies between these 2 unit vectors" mean quadrant +a+b?

if so: can check calculating projection of test vector lets c on vectors a , b:

projection_conb = c * b' , c * a'. indeed dot products.

now signs of both these projections tell in quadrant defined , b vector c in.

now i'm not sure if there build-in function should easy plenty create own function!

matlab vector between

No comments:

Post a Comment