Problem 1448. Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
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.
Solution Stats
Problem Comments
- 
		3 Comments
		Ned Gulley
    	on 24 Apr 2013
	
	
  	You should call this a volcano matrix!
		Richard Zapor
    	on 27 Apr 2013
	
	
  	Could also be named an Atoll matrix
		Chintan
    	on 27 Apr 2013
	
	
  	Thanks Ned, Richard for good suggestion. I have changed Problem Title accordingly.
Solution Comments
Show commentsProblem Recent Solvers152
Suggested Problems
- 
         Extract leading non-zero digit 2194 Solvers 
- 
         
         498 Solvers 
- 
         We love vectorized solutions. Problem 1 : remove the row average. 863 Solvers 
- 
         
         445 Solvers 
- 
         
         263 Solvers 
More from this Author10
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!