x new & old A matrices

figure
xr = [-6.5:0.1:6.5];  % discretized x range
x = zeros(n,1);
Px = zeros(1,length(xr));

% base design matrix
A0 = randn(m,n); % Gaussian A
%A0 = rand(m,n);  % Uniform A
%A0 = sign(randn(m,n));  % Binary A

if noise==0, noise = 1e-6; end  % need finite noise
if k0==0, k0 = fix(n/2); end;   % k0 can not be 0
k0 = min([k0 n]);               % k0 must be <= n

% single-k  (n-choose-k)  or  all-k  (2^n - 2 patterns)
if k > 0, kset = k; else, kset = 1:n-1; end

for