Use 3x3 Matrix to create 9x15 Matrix.

What would be the simplest approach to use a 3x3 Matrix (the one in the left corner) to create this one (9x15).

 Respuesta aceptada

Image Analyst
Image Analyst el 15 de Mzo. de 2016
Well here is one way:
% Define the 3 by 3 matrix.
array3x3 = [1 2 3; 4, 5, 6; 7, 8, 9];
% Create the top and middle bands.
band1 = repmat([array3x3, zeros(3)], 1, 3)
band2 = circshift(band1, 3, 2)
% Stack them vertically.
final9x15 = [band1(:, 1:15); band2(:, 1:15); band1(:, 1:15)]

Más respuestas (0)

Preguntada:

el 15 de Mzo. de 2016

Editada:

el 15 de Mzo. de 2016

Community Treasure Hunt

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

Start Hunting!

Translated by