Cody

Problem 44887. Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:

Created by Yoav Shallev in Community
A =
[1 2 3
4 5 6]
-----------
B =
[0 0 0 0 0
0 1 2 3 0
0 4 5 6 0
0 0 0 0 0]

Solution Stats

27.79% Correct | 72.21% Incorrect
Last solution submitted on Jul 15, 2019

Solution Comments