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
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers152
Suggested Problems
-
Return the largest number that is adjacent to a zero
5136 Solvers
-
Sum all integers from 1 to 2^n
14211 Solvers
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2038 Solvers
-
485 Solvers
-
3429 Solvers
More from this Author4
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!