Here are a few pointers which may be able to help you.
Since SNR is the ratio of Signal Power to noise power it should be computed using the following method SNR = snr (x,y-x) since “x” is the original signal and “y”is the noise corrupted signal.
The signal “y”is generated by using “awgn()” function with a random seed there may be some cases where the SNR may not match closely with the pre-defined value.
As a possible workaround you may use any of the following methods:
Specify the ‘seed’ attribute of the “awgn()” function forrepetitive generation of noise samples.
Use Monte-Carlo method to generate different “awgn()” noise samples and average over all the SNR values.As the number of Monte- Carlo simulations increase the average SNR closely approximates the predefined SNR.
Please refer to the following documentation link on “awgn()” function
Best Answer