Find the positive entries in a matrix

조회 수: 4 (최근 30일)
Sofie Önnemar
Sofie Önnemar 2022년 9월 3일
이동: Walter Roberson 2022년 9월 3일
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?

답변 (1개)

Torsten
Torsten 2022년 9월 3일
이동: Walter Roberson 2022년 9월 3일
nnz(A>0)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by