Hi everybody. I have a 2 x 10000 matrix.
I want a short code which can tell me exactly out of the 1000 are [1;1]s?

 採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 6 月 15 日

0 投票

A - your matrix
out = sum(ismember(A.',[1 1],'rows')) > 1000;

1 件のコメント

Ryan
Ryan 2012 年 6 月 15 日
What is the > 1000 for?

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by