calling the row with values in column

조회 수: 1 (최근 30일)
sampath kumar punna
sampath kumar punna 2019년 10월 25일
답변: Artemio Soto Breceda 2019년 10월 25일
Y
1 3
5 6
3 2
7 9
8 5
if Y is matrix , in the the second column we have values 2 and 5 , i want to call the row which is having value 2 and 5 in second column and from a new matrix
[ 3 2
8 5 ]
like this

채택된 답변

Artemio Soto Breceda
Artemio Soto Breceda 2019년 10월 25일
X = Y( (Y(:,2)==2 | Y(:,2)==5) , :);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by