There are times when brute force is the best option.
Type
Matrix = array [1 .. 7, 1 .. 7] of Integer ;
Survey = array [1 .. 49] of Integer ;
Procedure DoSurvey (Var S : Survey ; M : Matrix) ;
begin
S[1] := M[1,1] ;
S[2] := M[2,1] ;
S[3] := M[3,1] ;
S[4] := M[4,1] ;
S[5] := M[5,1] ;
S[6] := M[6,1] ;
S[7] := M[7,1] ;
S[8] := M[7,2] ;
S[9] := M[7,3] ;
S[10] := M[7,4] ;
S[11] := M[7,5] ;
S[12] := M[7,6] ;
S[13] := M[7,7] ;
S[14] := M[6,7] ;
S[15] := M[5,7] ;
S[16] := M[4,7] ;
S[17] := M[3,7] ;
S[18] := M[2,7] ;
S[19] := M[1,7] ;
S[20] := M[1,6] ;
S[21] := M[1,5] ;
S[22] := M[1,4] ;
S[23] := M[1,3] ;
S[24] := M[1,2] ;
S[25] := M[2,2] ;
S[26] := M[3,2] ;
S[27] := M[4,2] ;
S[28] := M[5,2] ;
S[29] := M[6,2] ;
S[30] := M[6,3] ;
S[31] := M[6,4] ;
S[32] := M[6,5] ;
S[33] := M[6,6] ;
S[34] := M[5,6] ;
S[35] := M[4,6] ;
S[36] := M[3,6] ;
S[37] := M[2,6] ;
S[38] := M[2,5] ;
S[39] := M[2,4] ;
S[40] := M[2,3] ;
S[41] := M[3,3] ;
S[42] := M[4,3] ;
S[43] := M[5,3] ;
S[44] := M[5,4] ;
S[45] := M[5,5] ;
S[46] := M[4,5] ;
S[47] := M[3,5] ;
S[48] := M[3,4] ;
S[49] := M[4,4]
end ;
Although crude, this solution is straightforward and easy to understand, a very important consideration. It may even be faster and more efficient than a more complex solution. You have to measure to be sure.