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

📄 comrun.m

📁 数字通信第四版原书的例程
💻 M
字号:
function [err_rate, dist] = comrun(src_flg, src_par,... 
                                   scc_flg, scc_par,...
                                   cod_flg, cod_par,...
                                   mod_flg, mod_par,...
                                   chn_flg, chn_par,...
                                   fig_flg, fig_par);
%COMRUN communication GUI complete run funciton file.
%       [ERR_RATE, DIST] = COMRUN(SRC_FLG, SRC_PAR, SCC_FLG, SCC_PAR,...
%           COD_FLG, COD_PAR, MOD_FLG, MOD_PAR, CHN_FLG, CHN_PAR,...
%           FIG_FLG, FIG_PAR)
%       computes the bit error rate of the specified methods for each
%       typical communication system simulation.
%       ???_FLG is a string for computation flag. When it is empty or
%           'none', the computation bypass this computation step.
%       ???_PAR is a string for computation parameter. The format is
%           determined by the contents of ???_FLG.
%       Wes Wang coded from 7/21/95 to 
%       Copyright (c) 1995-96 by The MathWorks, Inc.
%       $Revision: 1.1 $  $Date: 1996/04/01 17:54:37 $
%

% source generating
% generate variable x
if findstr(src_flg, 'sin')
elseif findstr(src_flg, 'tria')
elseif findstr(src_flg, 'randint')                      
elseif findstr(src_flg, 'rand')
end;

% source coding
% generate indx quan codebook partition
quan = [];
if isempty(scc_flg)
    indx = x;
elseif findstr(scc_flg, 'none')
    indx = x;
elseif findstr(scc_flg, 'quant')
elseif findstr(scc_flg, 'dpcm')
    if findstr(scc_flg, 'auto')
    else
    end;
else
    indx = x;
end; 

% error-control coding
codeword = comcod('code', cod_flg, cod_par, message);

% modulation computation.
modulated = commod('modulation', mod_flg, mod_par, codeword);

% channel
if isempty(chn_flg)
elseif findstr(chn_flg, 'none')
elseif findstr(chn_flg, 'Gaussian')
elseif findstr(chn_flg, 'Uniform')
end;

demodulated = commod('demodualtion', mod_flg, mod_par, indx)

message = comcod('demodulated', cod_flg, cod_par, codeword);

src_dec = comscc('recov', scc_flg, scc_par,message);

⌨️ 快捷键说明

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