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

📄 cp0801_gnoise1.m

📁 此文件收集了《超宽带无线电基础》一书中的所有关于UWB的matlab代码。是进行UWB仿真开发的好工具。
💻 M
字号:
%
% FUNCTION 8.2 : "cp0801_Gnoise1"
%
% Introduces additive white Gaussian noise over signal
%  'input'.
% Vector 'ebno' contains the target values of Eb/No (in dB)
% 'numbits' is the number of bits conveyed by the input
%  signal
% 
% Multiple output signals are generated, one signal for
% each target value of Eb/No. The array 'output' contains
% all the signals (input+AWGN), one signal per row.
% The array 'noise' contains the different realization of
% the Gaussian noise, one realization per each row
%
% Programmed by Guerino Giancola
%

function [output,noise] = ...
   cp0801_Gnoise1(input,ebno,numbits)

% -------------------------------
% Step One - Introduction of AWGN
% -------------------------------

Eb = (1/numbits)*sum(input.^2); % measured energy per bit
EbNo = 10.^(ebno./10);          % Eb/No in linear unit     
No = Eb ./ EbNo;                % Unilateral spectral
                                % density
nstdv = sqrt(No./2);            % Standard deviation for
                                % the noise

for j = 1 : length(EbNo)
        
    noise(j,:) = nstdv(j) .* randn(1,length(input));
    output(j,:) = noise(j,:) + input;
    
end

⌨️ 快捷键说明

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