You just need to iterate over your matrix. I'm using GNU Octave, but it's very close to MatLab so the same should work for you.

Let's say you want the permutations of some matrix such as this:

Make the permutation matrix:

Now you can iterate over it with something like:

Code:

for j = 1:size(b); b(j,:) endfor

That's just printing the rows one by one (because I didn't put a semi-colon after the but you can process each row as you go. Just do something right before the endfor.

It's worthwhile to really get to know how to manipulate matrices in MatLab. That's pretty much how you do everything in it.