How to find vector in array of vectors with the highest value of one component?

1 回表示 (過去 30 日間)
I feel like there's an easy solution to this that I'm missing. I have an array of points, p(x,y,z,i), in which the first three components, x, y, and z, are a point in 3d space and the last component, i, is the number assigned to that point. I want to search through the array and find the vector with the highest y-value. How can I do this?


Matt J
Matt J 2023 年 4 月 18 日
編集済み: Matt J 2023 年 4 月 18 日
If I assume that p is an Nx4 array, then,
  3 件のコメント
Michael Boyte
Michael Boyte 2023 年 4 月 19 日
That did it. Thanks!


その他の回答 (0 件)


Help Center および File ExchangeAnnotations についてさらに検索





Community Treasure Hunt

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

Start Hunting!

Translated by