Subtracting XYZ coordinates defined by matrices
Show older comments
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 Comments
Image Analyst
on 23 Jan 2021
Please give an example with A having 5 rows and B having 3 rows and give the expected/desired output.
Isaac John
on 23 Jan 2021
Steven Lord
on 23 Jan 2021
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
on 23 Jan 2021
Image Analyst
on 23 Jan 2021
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
on 23 Jan 2021
Accepted Answer
More Answers (1)
Image Analyst
on 24 Jan 2021
1 vote
"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.
Categories
Find more on Big Data Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



