function A = createradon( n,p )
%CREATERADON
if (nargin<1)
    n=128;
end
if (nargin<2)
    p=32;
end

%name=[spectfile('radon.matrix.') num2str(n) '.' num2str(p) '.mat']
%fid=fopen(name,'r');
%if (fid>0)
%    load(name);
%    size(A)
%    fclose(fid);
%    return
%end

'Computing discretized Radon matrix'
bild=zeros(n);
phi=(0:(p-1))/p*180;
q=radondim(n);
A=sparse(1,1,0,p*q,n*n,(2*n*q*q));
format compact;
for i=1:n
    %i
    for k=1:n
        bild(i,k)=1;
        dat=radon(bild,phi);
        bild(i,k)=0;
        A(:,(i-1)*n+k)=reshape(dat,[p*q 1]);
    end
end
%save(name,'A');
end

