Simple Matrix Reduction Question. Ones and Zeros.
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Chad
el 1 de Abr. de 2020
Respondida: Stephen23
el 1 de Abr. de 2020
I have a NxM matrix full of ones and zeros. Each row (1:N) has exactly one, one, somewhere along of the columns. I want to make a matrix Nx1 which shows which columns the ones appeared in. Example:
A = [ 0 0 0 1; 1 0 0 0; 0 1 0 0; 0 0 1 0]
B = [ 4 ; 1 ; 2 ; 3 ]
Should be very simple?
0 comentarios
Respuesta aceptada
Más respuestas (1)
Ver también
Categorías
Más información sobre Matrices and Arrays 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!