how can I find the rows number that all are zero?
    4 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    bilgesu ak
 el 22 de Mayo de 2015
  
    
    
    
    
    Comentada: John D'Errico
      
      
 el 22 de Mayo de 2015
            I have a matrix for example:
prec=[ 0 0 0 0; 0 0 0 0; 1 0 0 1; 0 1 0 1];
I want to find the rows number that all the elements are zero i.e. first and second row. I write my cod as:
for i=1:4;
x=find(prec(i,:))==0
end
but it gives wrong answer. How can I write it?
Thanks in advance...
0 comentarios
Respuesta aceptada
Más respuestas (1)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!