SNR and noise in Simulations I've always taken the definition of noise and SNR for granted in doing BER simulations in an AWGN channel. I would usually use the AWGN noise function and make a loop with varying SNR values. 
However, I am looking at other coding examples and I found this: 

sig= 1/sqrt(2*SNR);     
n1 = randn(NN,1);
noise1=sig*n1;
N0=2*(sig.^2);



Is this the definition embedded in the AWGN function in MATLAB?
If not, then what is it and why is sig defined this way and what is it in relation to N0?
The AWGN variance is:

sig= 1/sqrt(2*SNR);     


Then, you define a random sequence:

n1 = randn(NN,1);


So the noise signal is:

noise1=sig*n1;


And the PSD is:

N0=2*(sig.^2);


Have a look to this example for more info.