Storing permutation matrix in a vector form

204 Views Asked by At

I've seen that permutation matrix doesn't have to be stored in a matrix form, but in a vector form, where each entry corresponds to column where 1 is located. But then how do we apply permutation on matrix given such a vector (using matlab)?