create matrix like below --
for x=2,
y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3 2 1; 1 2 2 2 1; 1 1 1 1 1] . for x=3, y=[1 1 1 1 1 1 1 1 1; 1 2 2 2 2 2 2 2 1; 1 2 3 3 3 3 3 2 1; 1 2 3 4 4 4 3 2 1; 1 2 3 4 5 4 3 2 1; 1 2 3 4 4 4 3 2 1; 1 2 3 3 3 3 3 2 1; 1 2 2 2 2 2 2 2 1; 1 1 1 1 1 1 1 1 1]
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers22
Suggested Problems
-
247 Solvers
-
middleAsColumn: Return all but first and last element as a column vector
653 Solvers
-
Find the maximum number of decimal places in a set of numbers
3599 Solvers
-
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
266 Solvers
-
I've got the power! (Inspired by Project Euler problem 29)
148 Solvers
More from this Author174
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!