📄 eqber_siggen.html
字号:
<html xmlns:mwsh="http://www.mathworks.com/namespace/mcode/v1/syntaxhighlight.dtd"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--This HTML is auto-generated from an M-file.To make changes, update the M-file and republish this document. --> <title>EQBER_SIGGEN - Generate a noisy, channel-filtered signal to be equalized</title> <meta name="generator" content="MATLAB 7.0"> <meta name="date" content="2004-06-22"> <meta name="m-file" content="eqber_siggen"><style>body { background-color: white; margin:10px;}h1 { color: #990000; font-size: x-large;}h2 { color: #990000; font-size: medium;}p.footer { text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;}pre.codeinput { margin-left: 30px;}span.keyword {color: #0000FF}span.comment {color: #228B22}span.string {color: #A020F0}span.untermstring {color: #B20000}span.syscmd {color: #B28C00}pre.showbuttons { margin-left: 30px; border: solid black 2px; padding: 4px; background: #EBEFF3;}pre.codeoutput { color: gray; font-style: italic;}pre.error { color: red;}/* Make the text shrink to fit narrow windows, but not stretch too far in wide windows. On Gecko-based browsers, the shrink-to-fit doesn't work. */ p,h1,h2,div { /* for MATLAB's browser */ width: 600px; /* for Mozilla, but the "width" tag overrides it anyway */ max-width: 600px; /* for IE */ width:expression(document.body.clientWidth > 620 ? "600px": "auto" );} </style></head> <body> <h1>EQBER_SIGGEN - Generate a noisy, channel-filtered signal to be equalized</h1> <p>This script generates a noisy, channel-filtered signal to be processed by a linear equalizer, a DFE equalizer, and an MLSE equalizer. The channel state information is retained between blocks of signal data. The script also sets the state of the data and noise generators for its first run, then allows the states to update automatically. </p><pre class="codeinput"><span class="comment">% Generate a PSK signal</span><span class="keyword">if</span> (firstRun) msg = randint(nBits, 1, M, dataState);<span class="keyword">else</span> msg = randint(nBits, 1, M);<span class="keyword">end</span>txSig = pskmod(msg, M);<span class="comment">% Pass the signal through the channel</span>[filtSig, chanState] = filter(chnl, 1, txSig, chanState);<span class="comment">% Add AWGN to the signal</span>SNR = EbNo(EbNoIdx) + 10*log10(Rb/Fs);<span class="keyword">if</span> (firstRun) noisySig = awgn(filtSig, SNR, <span class="string">'measured'</span>, noiseState); firstRun = false;<span class="keyword">else</span> noisySig = awgn(filtSig, SNR, <span class="string">'measured'</span>);<span class="keyword">end</span></pre><p class="footer">Copyright 1996-2004 The MathWorks, Inc.<br> Published with MATLAB® 7.0<br></p> <!--##### SOURCE BEGIN #####%% EQBER_SIGGEN - Generate a noisy, channel-filtered signal to be equalized% This script generates a noisy, channel-filtered signal to be processed by a% linear equalizer, a DFE equalizer, and an MLSE equalizer. The channel state% information is retained between blocks of signal data. The script also sets% the state of the data and noise generators for its first run, then allows the% states to update automatically.% Copyright 1996-2004 The MathWorks, Inc.% $Revision: 1.1.4.1 $ $Date: 2004/06/30 23:03:15 $% Generate a PSK signalif (firstRun) msg = randint(nBits, 1, M, dataState);else msg = randint(nBits, 1, M);endtxSig = pskmod(msg, M);% Pass the signal through the channel[filtSig, chanState] = filter(chnl, 1, txSig, chanState);% Add AWGN to the signalSNR = EbNo(EbNoIdx) + 10*log10(Rb/Fs);if (firstRun) noisySig = awgn(filtSig, SNR, 'measured', noiseState); firstRun = false;else noisySig = awgn(filtSig, SNR, 'measured');end##### SOURCE END #####--> </body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -