How to compare rows of a matric?

1 回表示 (過去 30 日間)
Harsha M V
Harsha M V 2021 年 9 月 3 日
編集済み: KSSV 2021 年 9 月 3 日
I have a 50x4 matrix.
Here, how to find a row that all its elements are greater than the other elements of the rows in that matrix?

採用された回答

KSSV
KSSV 2021 年 9 月 3 日
編集済み: KSSV 2021 年 9 月 3 日
A = rand(1,3) ; % your row
B = rand(3) ; % Say complete matrix
idx = A > B ; % comapre
r = find(sum(idx,2)==3) % find which row is greater
Run a loop for each row.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by