필터 지우기
필터 지우기

Hello I need to write a function that the file name is count(a,b,c) to count how many positive number . what i have to write?

조회 수: 2 (최근 30일)
function [p]= count(a,b,c) ...... complet the rest code
  댓글 수: 4

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2018년 5월 31일
편집: KSSV 2018년 5월 31일
If a is a vector use:
count_positive = nnz(a>0) ;

카테고리

Help CenterFile Exchange에서 Debugging and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by