size(p) returns the number of elements permuted and the number of cycles.
0001 function s = size(p) 0002 % size(p) returns the number of elements permuted and the number of cycles. 0003 s1 = length(p.array); 0004 c = cycles(p); 0005 s2 = length(c); 0006 s = [s1,s2];