Matlab receiver function codes