x = your matrix
c = a vector with column numbers to reverse
x(:,c) = 6 - x(:,c);
e.g.,
>> x = randi(5,6,6) % <-- some sample data
x =
1 2 2 1 5 3
4 4 5 3 5 5
2 4 1 1 1 1
3 4 5 5 2 2
1 3 3 1 2 1
4 1 5 4 5 1
>> c = [1 3 6] % <-- columns to work on
c =
1 3 6
>> x(:,c) = 6 - x(:,c)
x =
5 2 4 1 5 3
2 4 1 3 5 1
4 4 5 1 1 5
3 4 1 5 2 4
5 3 3 1 2 5
2 1 1 4 5 5