mean of logical array(s)

2 ビュー (過去 30 日間)
Rupak Bhattacharya
Rupak Bhattacharya 2017 年 5 月 15 日
コメント済み: Walter Roberson 2017 年 5 月 15 日
How to estimate the logical mean of multidimensional logical array???
  3 件のコメント
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 日
nnz(A) / numel(A)

カテゴリ

Help Center および File ExchangeSpecial Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by