function plotneededsamplesuniform(L,N,sigma,upperlimsamples)

  c = L/N;
  truecapacitiesall = [];  
  %get an estimate very close to the true capacity
  for (numsamples=10:10:upperlimsamples)
    numsamples
    sum = 0;
    for (k=1:numsamples)
      V = zeros(N,L);
      for (k=1:L) 
        V(:,k) = ((exp(2*pi*j*rand(1))).^(0:(N-1)))';
      end
      V = (1/sqrt(N))*V;
      sum = sum + log2(det( eye(N,N) + (1/(sigma^2)) * V * V' ));
    end
    truecapacitiesall = [ truecapacitiesall sum/(numsamples*N) ];
  end
      
  plot(10:10:upperlimsamples,truecapacitiesall,'ko');
  xlabel('Number of samples');
  ylabel('Capacity');