Question: My goal is to write a MATLAB code that generates a nearest - neighbor map / table of N points listed in provided file xyz
My goal is to write a MATLAB code that generates a nearestneighbor maptable of N points listed in provided filexyztxt Assume that the nearest neighbors of a point lies within a radial distance of units. We are given: maximum radial distance r Nnumber of points and L where L is the length, height, and width of a cubic boundary box. I know that I have the right general concept in my code, but I am not implementing the boundary box correctly. See image showing my codeMy results should show that no index has more than Nearest Neighbors not worried about ndNN or rdNN or kthNN yet but instead I am getting that every index has NNs I need help implementing boundary and fixing this. Please test results to make sure is the greatest. I am confused greatly beyond this point, so expalantion is greatly appreciated. Someone mentioned implementing only the uppertriangle of the matrix?? Also, we do not want to back track maybe meaning not to repeat idk?? We insist that NNs are reversible, if i is NN of j then j is NN of i Also my notes say if portion of the radius around the current point is outside of the box, map changes to accomodate the box" Please help me understand and correct my mistake. I have attached my code, and you can see the results. Please help me fix this code to get appropriate results. Thank you in advace.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
