Filter löschen
Filter löschen

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 Ansichten (letzte 30 Tage)
function [p]= count(a,b,c) ...... complet the rest code
  4 Kommentare

Melden Sie sich an, um zu kommentieren.

Antworten (1)

KSSV
KSSV am 31 Mai 2018
Bearbeitet: KSSV am 31 Mai 2018
If a is a vector use:
count_positive = nnz(a>0) ;

Kategorien

Mehr zu Debugging and Analysis finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by