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 Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by