I hereby claim:
- I am thvhauwe on github.
- I am thijsvh (https://keybase.io/thijsvh) on keybase.
- I have a public key ASBYRhnWkL7vRDceJA8gkAp71lVAGvP5dgUa9oW7PP608Qo
To claim this, I am signing this object:
function awgn(X,SNR) | |
#Assumes X to be a matrix and SNR a signal-to-noise ratio specified in decibel (dB) | |
#Implented by author, inspired by https://www.gaussianwaves.com/2015/06/how-to-generate-awgn-noise-in-matlaboctave-without-using-in-built-awgn-function/ | |
N=length(X) #Number of elements in X | |
signalPower = sum(X[:].^2)/N | |
linearSNR = 10^(SNR/10) | |
a,b=size(X) | |
noiseMat = randn((a,b)).*√(signalPower/linearSNR) #Random gaussian noise, scaled according to the signal power of the entire matrix (!) and specified SNR | |
return solution = X + noiseMat |
I hereby claim:
To claim this, I am signing this object: