function ii = getphinds(m,n) %dims = repmat([m],[1 n]); ii = 1:m:m^n; ii = [ii; ii+1]; ii = ii(:); return