Subtracting XYZ coordinates defined by matrices
이전 댓글 표시
I have two matrices, A (96100x3) and B(16416x3). I need to subtract the XYZ coordinates defined by the columns of B from those of A. But as they are of different resolutions, the difference or setxor is still giving sort of union of these two matrices.
Is there any way I can subtract the region bounded by B from A?
TIA
댓글 수: 6
Image Analyst
2021년 1월 23일
Please give an example with A having 5 rows and B having 3 rows and give the expected/desired output.
Isaac John
2021년 1월 23일
Steven Lord
2021년 1월 23일
What exactly would you expect the result to be if I gave you the following points? How did you compute those expected results? Be specific in describing your process.
If these are not valid values for A and B, explain why they are invalid.
A = [6 1 2; 7 2 7; 1 4 7; 7 7 4; 5 7 6]
B = [2 8 1; 4 9 8; 9 6 9]
Isaac John
2021년 1월 23일
Image Analyst
2021년 1월 23일
Isaac, so you have this:
A = [6 1 2; 7 2 7; 1 4 7; 7 7 4; 5 7 6]
B = [6.1 1.2 2.3; 1.2 4.1 7.4]
C = [7 2 7; 7 7 4; 5 7 6]
A =
6 1 2
7 2 7
1 4 7
7 7 4
5 7 6
B =
6.1 1.2 2.3
1.2 4.1 7.4
C =
7 2 7
7 7 4
5 7 6
Can you explain how you get each of the 3 rows of C? Why would you want 3 rows from C when A had 5 rows and B had 2 rows? C does not even have any fractional parts - it's all integers even though B is not integers. Explain your thought process.
Isaac John
2021년 1월 23일
채택된 답변
추가 답변 (1개)
Image Analyst
2021년 1월 24일
1 개 추천
"For instance let A correspond to the point cloud corresponding to a sphere and B correspond to a smaller, concentric sphere. The result (equivalent to setxor) that I am seeking is a hollow sphere, that is a resultant of subracting the smaller sphere from the larger sphere."
Sounds like you want convhulln(). Use it on one cloud and then test all the points of one to see if the point is inside the convex hull of the other.
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




