If input n=5, then magic(n) is
17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 12 19 21 3 11 18 25 2 9
The output is of the form [row,column] for the place where n appears.
output = [2,2]
It's not clear how the output should be calculated
Not a general solution as X={4,6,8,...} are not on row 2.
613 Solvers
Back to basics 20 - singleton dimensions
225 Solvers
551 Solvers
Matlab Basics - Absolute Value
272 Solvers
700 Solvers