12
I use this code to create and plot N points:
N=input('No. of Nodes:');
data = rand(N,2) % Randomly generated n no. of nodes
x = data(:,1);
y = data(:,2);
plot(x,y,'*');
How do I choose k points (with probability p=0.25) out of N points, then color those k points red and leave the other points as *.