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:

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

32.95% Correct | 67.05% Incorrect
Last Solution submitted on Aug 03, 2024

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers153

Suggested Problems

More from this Author4

Community Treasure Hunt

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

Start Hunting!