Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 411. Back to basics 21 - Matrix replicating

Created by Alan Chalker

Covering some basic topics I haven't seen elsewhere on Cody.

Given an input matrix, generate an output matrix that consists of the input matrix replicated in a 2 by 2 pattern Examples:

[1] -> [1 1
        1 1]
[1 2       -> [1 2 1 2
 3 4]          3 4 3 4 
               1 2 1 2 
               3 4 3 4]

Tags

Problem Group

Solution Statistics

252 correct solutions 24 incorrect solutions
Last solution submitted on Jul 25, 2014