Effacer les filtres
Effacer les filtres

finding last column values

3 vues (au cours des 30 derniers jours)
busra gogen
busra gogen le 16 Jan 2021
Commenté : busra gogen le 19 Jan 2021
I have 12094*3 matrix and 7*2 matrix. Second matrix is coordinates of a polygon which is bounded. I used inpolygon method to analyse the region. I obtained 237 points inside 12094*3. Now i want to find third values of inside points which are third column of 12094*3. Since inpolygon method is 2 dimensional, i have only information about how many points of 7*2 inside in the 12094*3 matrix. I tried find command but it does not work. Although i have 237 points, there are 15 values in workspace i dont know maybe i did wrong.
  1 commentaire
KALYAN ACHARJYA
KALYAN ACHARJYA le 17 Jan 2021
Modifié(e) : KALYAN ACHARJYA le 17 Jan 2021
Explaining through Maths is much easier than lengthy text.

Connectez-vous pour commenter.

Réponse acceptée

KSSV
KSSV le 17 Jan 2021
Let A be your 12094*3 matrix and P be your 7*2 matrix.
idx = inpolygon(A(:,1),A(:,2),P(:,1),P(:,2)) ;
iwant = A(idx,:) ;
  1 commentaire
busra gogen
busra gogen le 19 Jan 2021
thank you!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by