필터 지우기
필터 지우기

Couild anyone help me to count the number of nonzero elements present in each row of matrix

조회 수: 1 (최근 30일)
If i am having a matrix A=[1 0 2 0 3;
4 5 0 0 0;
3 9 0 0 1]
I want to count the number of non zero elements in a row and it shouls display in the following manner.
[3
2
3]
Could anyone please help me on this

채택된 답변

madhan ravi
madhan ravi 2019년 4월 4일

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by