Find the positive entries in a matrix

3 visualizaciones (últimos 30 días)
Sofie Önnemar
Sofie Önnemar el 3 de Sept. de 2022
Movida: Walter Roberson el 3 de Sept. de 2022
Write a function positivecounter.m that takes as an input matrix A and gives as an output the number of positive entries in matrix A. But how do I compute this problem?

Respuestas (1)

Torsten
Torsten el 3 de Sept. de 2022
Movida: Walter Roberson el 3 de Sept. de 2022
nnz(A>0)

Categorías

Más información sobre Multidimensional Arrays en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by