Azzera filtri
Azzera filtri

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 visualizzazioni (ultimi 30 giorni)
function [p]= count(a,b,c) ...... complet the rest code
  4 Commenti

Accedi per commentare.

Risposte (1)

KSSV
KSSV il 31 Mag 2018
Modificato: KSSV il 31 Mag 2018
If a is a vector use:
count_positive = nnz(a>0) ;

Categorie

Scopri di più su Debugging and Analysis in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by