need function to compute iterations of element in matrix
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (1)
Azzi Abdelmalek
am 28 Jan. 2014
Bearbeitet: Azzi Abdelmalek
am 28 Jan. 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 Kommentar
Abdulkareem
am 28 Jan. 2014
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!