Problem 2620. Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n.
Examples
If n = 3
y = 6 5 4
If n = 4
y = 13 10 7 4
Solution Stats
Problem Comments
- 
		3 Comments
 
		Pritesh Shah
    	on 7 Oct 2014
	
	
  	Please change test case. It is giving error. 
y_correct=[13 10 7 4];
		J.R.! Menzinger
    	on 7 Oct 2014
	
	
  	The brackets and the first test case has no function call.
		Ned Gulley
    	on 7 Oct 2014
	
	
  	I fixed the tests.
Solution Comments
Show commentsProblem Recent Solvers111
Suggested Problems
- 
         
         
4429 Solvers
 - 
         
Number of 1s in the Binary Representation of a Number
466 Solvers
 - 
         
         
468 Solvers
 - 
         
         
673 Solvers
 - 
         
         
1546 Solvers
 
More from this Author1
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!