need function to compute iterations of element in matrix
Mostra commenti meno recenti
hi every body i need matlab function to compute the number of iterations of one elements in matrix just like in excel when u want to compute for example how much the No. 3 occur in some column = counif(a1:a10;"=3") { in excel } is there a function in matlab can do the same thinks
tanks in advance
Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 28 Gen 2014
Modificato: Azzi Abdelmalek
il 28 Gen 2014
A=[1 2 3;3 0 1;4 5 6;3 1 5]
n1=sum(A(:,1)==3) % number of 3 in the first column
n2=sum(A(:,3)==3) % number of 3 in the third column
1 Commento
Abdulkareem
il 28 Gen 2014
Categorie
Scopri di più su Logical in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!