How to replace the elements of a matrix with another matrices
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Hi all,
How to replace the elements of a matrix with another matrices in one go with just a command?
for example: A = zeros(4,16) I want to replace the rows of A with the following matrices:
b=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
c=[2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]
d=[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]
e=[4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]
Thanks for your help.
Best wishes, S:-)
0 comentarios
Respuesta aceptada
Image Analyst
el 13 de En. de 2014
Editada: Image Analyst
el 13 de En. de 2014
Try this:
A = [b;c;d;e]
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!