⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 awgn_channel.m

📁 RS编解码过程,并包括进制转换和域的变换,可用于RS码仿真
💻 M
字号:
%高斯信道
function [rs]=AWGN_Channel(ss,snr)
%The function is to implement  an AWGN channel
%ss is the input signal;
%sn denotes the signal-noise ratio

%separate the real and image parts of input signal, respectively
ssR=real(ss);
%ssI=imag(ss);
Lss=length(ss);

%calculate the power of the image part of input signal,
ssrcov=xcov(ssR);
scr=ssrcov(Lss)/Lss;
ns=scr/mpower(10,snr/10);
nsR=sqrt(ns); 

%calculate the power of the real part of input signal,
%ssicov=xcov(ssI);
%sci=ssrcov(Lss)/Lss;
%ns=sci/mpower(10,snr/10);
%nsI=sqrt(ns); 

%produce the AWGN , add it to input signal and form AWGN channel
noiseR=nsR*randn(1,Lss);
%noiseI=nsI*randn(1,Lss);
noise=noiseR;
rs=ss+noise;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -