www.gusucode.com > 压缩感知重构算法 压缩感知源码程序 > block.m
%function sig = MakeBlocks(n) n=1024 f = (1:n) ./n; pos = [ .1 .13 .15 .23 .25 .40 .44 .65 .76 .78 .81]; hgt = [4 (-5) 3 (-4) 5 (-4.2) 2.1 4.3 (-3.1) 2.1 (-4.2)]; sig = zeros(size(t)); for j=1:length(pos) sig = sig + (1 + sign(t-pos(j))).*(hgt(j)/2) ; end plot(f,sig); axis([0 n -10 20]); title('(a) Noisy Signal'); %subplot(3,2,2); PlotWaveCoeff(alpha0, L, 0); %title('(b) Noisy wavelet coefficients');