mean of logical array(s)

How to estimate the logical mean of multidimensional logical array???

3 件のコメント

Stephen23
Stephen23 2017 年 5 月 15 日
mean(A(:))
Adam
Adam 2017 年 5 月 15 日
What is the 'logical mean'?
Walter Roberson
Walter Roberson 2017 年 5 月 15 日
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.

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

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 5 月 15 日

0 投票

nnz(A) / numel(A)

カテゴリ

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

質問済み:

2017 年 5 月 15 日

コメント済み:

2017 年 5 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by