grouping vectors based on z value
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示
Hi guys,
If I have how array of vectors a(xi,to,zi) and b(xj,y2k,zj), I want to extract a new group based on the condition zi=zj. And the cross product the resulted vectors. Thanks
11 件のコメント
Walter Roberson
2020 年 6 月 8 日
For each value in intersect(xi, xj) you have a 2D array a(:,:,I) and b(:,:,J) where zi(I) == zj(J) . How do you want to take the cross-product of the 2D arrays? Also, since there are possibly multiple values that match zi(I) == zj(J), how do you want the resulting 2D arrays to be stored ?
Kevin Joshi
2020 年 6 月 8 日
編集済み: Walter Roberson
2020 年 6 月 8 日
Oday Shahadh
2020 年 6 月 8 日
Walter Roberson
2020 年 6 月 8 日
You do not have vectors, you have points. Your diagram implies that you might be wanting one vector to be implied by the vertical projection to the x axes: is that what you want to do for all of the vectors?
I am unable to find any possible geometric interpretation for taking the cross-product of so many vectors together with each other. Especially since you have no absolute ordering, and cross-product is dependent on the angle but without ordering the angle is not meaningful.
Oday Shahadh
2020 年 6 月 8 日
Oday Shahadh
2020 年 6 月 8 日
Walter Roberson
2020 年 6 月 8 日
Why does your L1 not involve y?
Your L1 is just two rows of 0 and the third row is L values each repeated length(0:.5:2) * length(0:45:360) times. Why bother to go through that trouble with it? Why not just build it directly with zeros() and repelem() ?
Your cross() is guaranteed to be (0, 0, 0) each time.
Oday Shahadh
2020 年 6 月 8 日
編集済み: Oday Shahadh
2020 年 6 月 8 日
Walter Roberson
2020 年 6 月 8 日
Have you considered using pol2cart() ?
Oday Shahadh
2020 年 6 月 8 日
Oday Shahadh
2020 年 6 月 8 日
回答 (0 件)
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!