mean of logical array(s)

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

3 comentarios

Stephen23
Stephen23 el 15 de Mayo de 2017
mean(A(:))
Adam
Adam el 15 de Mayo de 2017
What is the 'logical mean'?
Walter Roberson
Walter Roberson el 15 de Mayo de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Matrices and Arrays en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 15 de Mayo de 2017

Comentada:

el 15 de Mayo de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by