mean of logical array(s)

2 Ansichten (letzte 30 Tage)
Rupak Bhattacharya
Rupak Bhattacharya am 15 Mai 2017
Kommentiert: Walter Roberson am 15 Mai 2017
How to estimate the logical mean of multidimensional logical array???
  3 Kommentare
Adam
Adam am 15 Mai 2017
What is the 'logical mean'?
Walter Roberson
Walter Roberson am 15 Mai 2017
Good question. It might be the majority. If so then
majority = nnz(A)*2 > numel(A);
The majority is not well defined if exactly half are one way and half are the other way.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 15 Mai 2017
nnz(A) / numel(A)

Kategorien

Mehr zu Special Functions 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