For example, if n=2 (maximum value), the output matrix should be
[1 1 1 1 1;
1 2 2 2 1;
1 2 1 2 1;
1 2 2 2 1;
1 1 1 1 1]
where you go from inside to outside starting from 1 to 2(maximum value) and again move back from 2 to 1.
You should call this a volcano matrix!
Could also be named an Atoll matrix
Thanks Ned, Richard for good suggestion. I have changed Problem Title accordingly.
nice!this is the easiest way to translate to another language.
Test for balanced parentheses
radius of a spherical planet
MATCH THE STRINGS (2 CHAR) very easy
Length of the hypotenuse
Time and Variable mapping and matching
Who has power to do everything in this world?
Basics: Divide integers to get integer outputs in all cases
Mirror Image matrix across anti-diagonal
Implement full adder circuit
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office