ber_2_sender.m
Upload User: cjx922
Upload Date: 2017-12-13
Package Size: 205k
Code Size: 0k
Category:

Communication

Development Platform:

Matlab

  1. function y=ber_2_sender(SNR_avg,modulation_type);
  2. %计算有两个等同发送方的理论ber
  3. global signal;
  4. switch signal.modulation_type
  5.     case 'BPSK'
  6.         mu = sqrt(SNR_avg ./ (1 / 2 + SNR_avg));
  7.     case 'QPSK'
  8.         mu = sqrt(SNR_avg ./ (1 + SNR_avg));
  9.     otherwise
  10.         error(['Modulation-type unknown: ', modulation_type])
  11. end
  12. y = 1 / 4 * (1 - mu) .^ 2 .* (2 + mu);