function plotneededsamplesgaussian(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)
      G = randn(L,N);
      sum = sum + log2(det( eye(N,N) + (1/(sigma^2)) * (1/N) * G * G' ));
    end
    truecapacitiesall = [ truecapacitiesall sum/(numsamples*N) ];
  end
      
  plot(10:10:upperlimsamples,truecapacitiesall,'ko');
  xlabel('Number of samples');
  ylabel('Capacity');
  
  
  
  