# HG changeset patch # User idamnjanovic # Date 1269525946 0 # Node ID 41a5a3c2696137b4d9cd4b29192806cd9fba8f89 # Parent 51b76c31c93dfc6f5ed9f982ddc63033430311f9 diff -r 51b76c31c93d -r 41a5a3c26961 Problems/private/countcover.m --- a/Problems/private/countcover.m Thu Mar 25 14:05:27 2010 +0000 +++ b/Problems/private/countcover.m Thu Mar 25 14:05:46 2010 +0000 @@ -6,6 +6,8 @@ % and are shifted between them by steps of size STEPSIZE=[S1 S2 ... Sp]. % COUNTCOVER returns a matrix the same size as the signal, containing in % each entry the number of blocks covering that sample. +% +% See also IM2COLSTEP, COL2IMSTEP, IM2COL. % Ron Rubinstein diff -r 51b76c31c93d -r 41a5a3c26961 Problems/private/make.m --- a/Problems/private/make.m Thu Mar 25 14:05:27 2010 +0000 +++ b/Problems/private/make.m Thu Mar 25 14:05:46 2010 +0000 @@ -13,7 +13,7 @@ % Technion, Haifa 32000 Israel % ronrubin@cs % -% April 2009 +% August 2009 % detect platform @@ -32,9 +32,9 @@ % Compile files % -sourcefiles = {'addtocols.c','collincomb.c','rowlincomb.c'}; +sourcefiles = {{'addtocols.c'}, {'collincomb.c'}, {'rowlincomb.c'}, {'sprow.c','mexutils.c'}, {'im2colstep.c'}, {'col2imstep.c'}}; for i = 1:length(sourcefiles) - printf('Compiling %s...', sourcefiles{i}); - mex(sourcefiles{i},compile_params{:}); + printf('Compiling %s...', sourcefiles{i}{1}); + mex(sourcefiles{i}{:},compile_params{:}); end diff -r 51b76c31c93d -r 41a5a3c26961 Problems/private/sampgrid.m --- a/Problems/private/sampgrid.m Thu Mar 25 14:05:27 2010 +0000 +++ b/Problems/private/sampgrid.m Thu Mar 25 14:05:46 2010 +0000 @@ -26,6 +26,9 @@ p = ndims(x); +if (p==2 && any(size(x)==1) && length(blocksize)==1) + p = 1; +end if (numel(blocksize)==1) blocksize = ones(1,p)*blocksize; @@ -67,27 +70,3 @@ end end - -% -% p = ndims(x); -% -% n = zeros(1,p); -% for i = 1:p -% n(i) = length(varargin{i}); -% end -% -% nsamps = prod(n); -% -% % create y of the same class as x -% y = zeros(prod(blocksize),nsamps,class(x)); -% -% id = cell(p,1); -% for k = 1:nsamps -% [id{:}] = ind2sub(n,k); -% for j = 1:p -% id{j} = varargin{j}(id{j}) : varargin{j}(id{j})+blocksize(j)-1; -% end -% block = x(id{:}); -% y(:,k) = block(:); -% end -