Borrar filtros
Borrar filtros

Copy one matrix into another

39 visualizaciones (últimos 30 días)
dakhli mohamed
dakhli mohamed el 4 de Nov. de 2018
Comentada: Walter Roberson el 5 de Oct. de 2020
I have a matrix of 3 * 3 and I want to copy it in another matrix of size 9 * 9 in the central position
A=hyperImage(3,C1(1,1),C2(1,1),C3(1,1));
Fenetre=zeros(9,9); for i=4:6 for j=4:6 Fenetre=repmat(A,1); end
end

Respuesta aceptada

madhan ravi
madhan ravi el 4 de Nov. de 2018
Editada: madhan ravi el 4 de Nov. de 2018
c=rand(9,9) %an example
a=ones(3,3)
c(4:6,4:6)=a
  3 comentarios
madhan ravi
madhan ravi el 4 de Nov. de 2018
Anytime :) make sure to accept the answer
Walter Roberson
Walter Roberson el 5 de Oct. de 2020
Ali Moh comments to madhan ravi:
You are an artist :)

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Matrix Indexing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by