function plotlambda(M)
%Usage: plotlambda(M).
%Plots the attenuation function lambda on an (M+1)^2 grid (zero outside
%disk).

[gx,gy] = makegrid(M);
A = lambda(gx,-gy); %Need minus to make A display in conventional way

miny = 0.0;
maxy = 1.0;
f = (gx.^2 + gy.^2) >= 1;

figure('Position',[200 200 650 650]);
graymap(255);
X = (-M:M)/M;
image(X,X,255-(255*(A-miny)/(maxy-miny)+255*f));
axis off;
title('Attenuation Function');