changing value in a 2d array
59 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
hi, thank you for your help.
I would like to know how to change values in a 2d array. For example, I have an 2d array A as of 1000x1000, of all zero values
I want to change value in position, 1x1, 1x100, 1x1000 to value 1.
do you know a quick way of doing this?
0 comentarios
Respuesta aceptada
Rick Rosson
el 11 de Jul. de 2011
Please try the following:
A(1,1) = 1;
A(1,100) = 1;
A(1,1000) = 1;
HTH.
Más respuestas (2)
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!