两个向量之间的角度matlab [英] Angle between two vectors matlab

查看:25
本文介绍了两个向量之间的角度matlab的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想计算两个向量V = [Vx Vy Vz]B = [Bx By Bz] 之间的角度.这个公式对吗?

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 + Vz*Bz)

 Angle = acosd (VdotB / norm(V)*norm(B))

还有其他方法可以计算吗?

and is there any other way to calculate it?

我的问题不是标准化向量或使其更容易.我在问如何获得这两个向量之间的角度

My question is not for normalizing the vectors or make it easier. I am asking about how to get the angle between this two vectors

推荐答案

基于这个链接,这似乎成为最稳定的解决方案:

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

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

这篇关于两个向量之间的角度matlab的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆