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 Solvers155
Suggested Problems
-
Swap the first and last columns
21766 Solvers
-
Extract leading non-zero digit
2191 Solvers
-
Number of 1s in a binary string
10261 Solvers
-
Count decimal digits of a number
228 Solvers
-
Replace every 3rd element in a vector with 4
257 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!