Find the positive entries in a matrix

4 Ansichten (letzte 30 Tage)
Sofie Önnemar
Sofie Önnemar am 3 Sep. 2022
Verschoben: Walter Roberson am 3 Sep. 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?

Antworten (1)

Torsten
Torsten am 3 Sep. 2022
Verschoben: Walter Roberson am 3 Sep. 2022
nnz(A>0)

Community Treasure Hunt

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

Start Hunting!

Translated by