Angle between two vectors matlab

后端 未结 5 1669
伪装坚强ぢ
伪装坚强ぢ 2020-12-06 07:52

I want to calculate the angle between 2 vectors V = [Vx Vy Vz] and B = [Bx By Bz]. is this formula correct?

VdotB = (Vx*Bx + Vy*By         


        
5条回答
  •  情歌与酒
    2020-12-06 08:24

    Based on this link, this seems to be the most stable solution:

    atan2(norm(cross(a,b)), dot(a,b))
    

提交回复
热议问题