I have this matrix:
1 44
1 24
2 56
1 26
2 51
2 56
I want to select all rows whose first column is a one.
That is, I want to get an array:
1 44
1 24
1 26
and on the other hand:
2 56
2 51
2 56
Thank you very much for the help

 채택된 답변

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 6월 3일

1 개 추천

A = [???] % Your data
B = A(A(:,1)==1, :)
Good luck

댓글 수: 2

Thank you very much for the help
Most Welcome! It is just a pleasure to help.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by