Assign values to a matrix from a 2 dimensional array....
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Piyum Rangana
el 2 de Abr. de 2017
Respondida: dpb
el 2 de Abr. de 2017
Think I have a 2-dimensional array(Assume that x and y co-ordinations). And I want to assign '1' to all those co-ordinations given in the array(If the matrix values all are Zeros). How to do that Task ?
0 comentarios
Respuesta aceptada
dpb
el 2 de Abr. de 2017
a(a==0)=1; % done!
Look up "matrix addressing" in documentation
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrices and Arrays en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!