% Make one dart throw at a unit-circle target.

px = 2*rand(1) - 1;
py = 2*rand(1) - 1;
if (px^2 + py^2 <= 1)
    plot(px, py, 'og');
else
    plot(px, py, 'or');
end
