필터 지우기
필터 지우기

How to compare rows of a matric?

조회 수: 2 (최근 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 CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by