MATLAB Cody - MATLAB Central

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:

Difficulty:Rate

Solution 1883576

Submitted on 25 Jul 2019 by HH
  • Size: 7
  • This is the leading solution.
This solution is locked. To view this solution, you need to solve the problem first.

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!
Go to top of page