MATLAB: How to reference the distance of any points from the center of a uniform distribution in a circle

in uniform distributionof a circleof pointsuse distance

I have done a uniform distribution of n number of points in a circle, I am stuck in trying to reference the distance of any of those points from the center of the circle to do a further calculation;
My uniform distribution goes as follows:
% radius of the circle
R = 500;
% number of samples
n = 1000;
% my uniform distribution
angle = 2 * pi*(rand(1,n));
r = R * sqrt(rand(1,n));
y = r.*sin(angle);
x = r.*cos(angle);
% the plot of the uniform distribution
plot(x,y,'r.');

Best Answer

distances = sqrt(x.^2 + y.^2);