- use indexing to subsample the data to exclude the zeros, or
- replace the zeros with +Inf,
excluding zeros from min of matrix column
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
[r, c] = find(A==min(A(i:n,i)),1);
this statement is being used to find thelocation of the minimum of a certain column given a for loop incrementing i. Can I edit this statement to exclude zero entries? On matrices without negative values, it is setting the minimum to zero, and I am not sure where or how I could include A~=0 in this statement.
2 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!