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 件のコメント

Maria Jesús Pérez Saiz
Maria Jesús Pérez Saiz 2021 年 6 月 3 日
Thank you very much for the help
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 6 月 3 日
Most Welcome! It is just a pleasure to help.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by