From: Lex on
Dear all,

how can I vectorize this pice of code? Let`s say m=100.
Thanks for your help.

[m n] = size(x);
y = sort(x);
for i=1:m
for j=1:m
ecop(i,j) = sum( (x(:,1)<=y(i,1)).*(x(:,2)<=y (j,2)) )/m;
end
end