function [x,y] = plotlevelgrid(p) % FUNCTION: plotlevelgrid Part of DPWT Toolbox % % SYNOPSIS: [X,Y] = plotlevelgrid(P) % % DESCRIPTION: For integer P corresponding to the log2 of % the length of a wavelet coordinate vector % plotlevelgrid plots a map of the wavelet % coordinates at levels -1 through P-1 % indicating by their position along the % abscissa the position of the center of the % inverse wavelet transform corresponding to % that coordinate. Level numbers appear % along the ordinant. Length is assumed to be % between 0 and 1. X and Y contain the plot % coordinates of the coordinate marks. % % NOTE: This function is mainly designed for use by plotwaveletcoords. % % EXAMPLE: w = randn(2^7,1); % plotlevelgrid(8); % % % AUTHOR: Neil Getz % DATE: 5-11-92 % % COPYRIGHT 1992, Neil Getz % if(nargin ~=1), help plotlevelgrid; return; end; clg, x = zeros(1,2^p - 1); y = x; % for size for level = 0:(p-1), x(2^(level):(2^(level+1) - 1)) ... = [1:2:( 2^(level+1) - 1 )] * 2^(-(level+1)); y(2^(level):(2^(level+1) - 1)) = level*ones(1,2^level); end; x = [1/2,x]; y = [-1,y]; for i = -1:(p-1), h = line([0 1], [i i]); set(h,'Color','b'); end axis([0 1 -2 p]); ylabel('Level');