MATLAB: Extract column 1, 4-6, 8 of an 8×8 matrix

8-by-8 matrix

Hello everyone, I have an 8×8 matrix and and I need to extract columns 1,4-6,8 as in the matrix below:
1 2 3 4 5 6 3 1
1 3 5 6 8 7 1 0
5 3 1 7 9 2 9 2
10 61 32 45 12 62 40 51
1 2 3 4 5 6 3 1
1 3 5 6 8 7 1 0
5 3 1 7 9 2 9 2
10 61 32 45 12 62 40 51
I don't really know how to. I have being on it for a while. Please any assistance will be appreciated. Thanks

Best Answer

A(:,[1 4:6 8])