need function to compute iterations of element in matrix
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (1)
Azzi Abdelmalek
el 28 de En. de 2014
Editada: Azzi Abdelmalek
el 28 de En. de 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 comentario
Abdulkareem
el 28 de En. de 2014
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!