Align a Vector to Another

版本 1.0.1 (1.1 KB) 作者: Ayad Al-Rumaithi
Calculates the rotation matrix that aligns a vector to another
16.0 次下载
更新时间 2024/9/22

查看许可证

This function calculates rotation matrix that aligns a vector to another.
function R=Rotation(a,b)
where:
a and b are (3*1) vectors
R is (3*3) rotation matrix that aligns vector a to b so that: the normalized vector of b equals R multiplied by the normalized vector of a
references:
Jur van den Berg (https://math.stackexchange.com/users/91768/jur-van-den-berg), Calculate Rotation Matrix to align Vector A to Vector B in 3d?, URL (version: 2016-09-01): https://math.stackexchange.com/q/476311

引用格式

Ayad Al-Rumaithi (2024). Align a Vector to Another (https://www.mathworks.com/matlabcentral/fileexchange/123395-align-a-vector-to-another), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2022b
兼容任何版本
平台兼容性
Windows macOS Linux
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.1

Added website

1.0.0