>> M = c(1,2:end).' + c(2:end,1).' - c(2:end,2:end); % requires MATLAB >= R2016b
>> M = triu(M,1) + triu(M,1).'
M =
0 15 14 13 10 7 4 1 2
15 0 9 6 4 12 1 3 1
14 9 0 10 8 5 3 1 2
13 6 10 0 17 2 11 1 4
10 4 8 17 0 1 12 1 7
7 12 5 2 1 0 1 7 5
4 1 3 11 12 1 0 3 9
1 3 1 1 1 7 3 0 8
2 1 2 4 7 5 9 8 0
For earlier MATLAB versions you could use bsxfun or meshgrid:
>> [X,Y] = meshgrid(c(1,2:end),c(2:end,1));
>> M = X+Y-c(2:end,2:end);
>> M = triu(M,1) + triu(M,1).'
M =
0 15 14 13 10 7 4 1 2
15 0 9 6 4 12 1 3 1
14 9 0 10 8 5 3 1 2
13 6 10 0 17 2 11 1 4
10 4 8 17 0 1 12 1 7
7 12 5 2 1 0 1 7 5
4 1 3 11 12 1 0 3 9
1 3 1 1 1 7 3 0 8
2 1 2 4 7 5 9 8 0