Power Spectral Density units
The MATLAB documentation says the default RBW is 9.76Hz, so for the same resistance the MATLAB solution would be expected to be -10*log(100,000/9.76) = -40.1dBm 

However the resistance is 1/50 so the power density will be 10*log(50) higher or +17.0dBm so total -23.1dBm. 

Still not quite right unless there's something going on with negative frequencies to get that 2:1 factor.