%function phitable(phi,m,n) function phitable(K,phi,m,n) dims = repmat([m],[1 n]); X = list_all_ind(dims)-1; %for xind = 1:m^n for i = 1:size(X,1); %x = ind2coord(xind,dims)-1; x = X(i,:); x = x(end:-1:1); % sometimes easier to read -- in line w/how % matlab displays xind = coord2ind(x+1,dims); y = phi(xind); xstr = num2str(x); xstr = strrep(xstr,' ',''); %fprintf('%s : %2.5f \n',xstr,y); k = K(xind); fprintf('%s : %+2.5f %1d \n',xstr,k,y); end return