How do i write a code which can calculate the cross production of two vectors?
2 ビュー (過去 30 日間)
古いコメントを表示
How do i write a code which can calculate the cross production of two vector ? Both of these two vectors are 1 by 5 vector
At first, i write the code like
a=randn(1,5);
b=randn(1,5);
cross_c=cross(a,b)
or
a=randn(1,5);
b=randn(1,5);
cross_c=cross(a,b,5)
But the window always show me
A and B must be of length 3 in the
dimension in which the cross
product is taken.
How do i write a code which can calculate the cross production of these two 1 by 5 vectors?
2 件のコメント
James Tursa
2019 年 9 月 24 日
Cross products are defined for 3-element vectors only. Maybe you could tell us what your definition of this for 5-element vectors would be. What are you using this for?
回答 (1 件)
Bruno Luong
2019 年 9 月 24 日
編集済み: Bruno Luong
2019 年 9 月 24 日
If A and B are 5 x 1
null([a;b])
returns a (5 x 3), 3 vectors in R^5 basis of NULL(SPAN(a,b))
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!