Function calculates vector which is cross product of input column vectors. It supports calculation in n-dimensional space.
Input vectors are represented in matrix form. Number of vectors must be n-1, where n is number of dimensions of space.
example 1:
>> x = [1 2 4; 2 4 5; 6 0 0; 4 2 0] % 3 column vectors in 4d space
>> y = nDimCrossProduct(x)
y =
60
-48
-18
36
example 2: (if you prefer working with row-vectors)
>> data = [2 4 5; 1 4 0]
>> nDimCrossProduct(data')'
ans =
[ -20, 5, 4 ]
引用格式
Peter Krammer (2025). n-dimensional cross product of vectors (https://www.mathworks.com/matlabcentral/fileexchange/181122-n-dimensional-cross-product-of-vectors), 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.0 |