Matrix manipulation

3 Ansichten (letzte 30 Tage)
Mate 2u
Mate 2u am 15 Jun. 2012
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?

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 15 Jun. 2012
A - your matrix
out = sum(ismember(A.',[1 1],'rows')) > 1000;
  1 Kommentar
Ryan
Ryan am 15 Jun. 2012
What is the > 1000 for?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by