/usr/share/doc/libitpp-dev/html/rayleigh.html is in libitpp-doc 4.3.1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Welcome to IT++!</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div style="width: 100%; height: 40px; background-color: #ffff00; border: 1px solid #b0b0b0; margin: 5px 5px 5px 0; padding: 2px;">
<a href="http://itpp.sourceforge.net"><img src="itpp_logo.png" alt="IT++ Logo" style="float: left; border: 0;"></a>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<div class="left">
<form id="FSearchBox" action="search.php" method="get">
<img id="MSearchSelect" src="search/mag.png" alt=""/>
<input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"/>
</form>
</div><div class="right"></div>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">Generating a correlated Rayleigh fading process </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>In this example we will generate a correlated Rayleigh fading process with a normaized Doppler frequency equal to 0.1. The normalized Doppler is defined as the multiplication of the maximum Doppler frequency by the sampling time (i.e. <img class="formulaInl" alt="$f_d = F_d T_s$" src="form_305.png"/>).</p>
<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="itcomm_8h.html">itpp/itcomm.h</a>></span></div>
<div class="line"></div>
<div class="line"><span class="keyword">using namespace </span>itpp;</div>
<div class="line"></div>
<div class="line"><span class="keywordtype">int</span> main()</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// Declare my_channel variable as an instance of the Rayleigh_Channel</span></div>
<div class="line"> <span class="comment">// class</span></div>
<div class="line"> <a class="code" href="classitpp_1_1TDL__Channel.html">TDL_Channel</a> my_channel;</div>
<div class="line"></div>
<div class="line"> <span class="comment">// The normalized Doppler frequency is set to 0.1</span></div>
<div class="line"> <span class="keywordtype">double</span> norm_dopp = 0.1;</div>
<div class="line"> my_channel.<a class="code" href="classitpp_1_1TDL__Channel.html#a8502b1dd0dfb0d7b438087739ab3b92d">set_norm_doppler</a>(norm_dopp);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Generate nrof_samples of the fading process and store them in ch_coeffs</span></div>
<div class="line"> <span class="comment">// matrix</span></div>
<div class="line"> <span class="keywordtype">int</span> nrof_samples = 10000;</div>
<div class="line"> cmat ch_coeffs;</div>
<div class="line"> my_channel.<a class="code" href="classitpp_1_1TDL__Channel.html#ae8892db45e45f63c1fd228baf94b0222">generate</a>(nrof_samples, ch_coeffs);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Open an output file "rayleigh_test.it"</span></div>
<div class="line"> <a class="code" href="classitpp_1_1it__file.html">it_file</a> ff(<span class="stringliteral">"rayleigh_test.it"</span>);</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Save channel coefficients to the output file</span></div>
<div class="line"> ff << <a class="code" href="classitpp_1_1Name.html">Name</a>(<span class="stringliteral">"ch_coeffs"</span>) << ch_coeffs;</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Close the output file</span></div>
<div class="line"> ff.<a class="code" href="classitpp_1_1it__file.html#a6e7217f36b35d6ea866e5fa8148009fa">close</a>();</div>
<div class="line"></div>
<div class="line"> <span class="comment">// Exit program</span></div>
<div class="line"> <span class="keywordflow">return</span> 0;</div>
<div class="line">}</div>
</div><!-- fragment --><p>You can use Matlab or Octave to examine the channel fading process that is stored int the output file <code>rayleigh_test.it</code>. Try the followigh code to view a part of the fading process:</p>
<div class="fragment"><div class="line">itload(<span class="stringliteral">"rayleigh_test.it"</span>)</div>
<div class="line">figure(1); clf;</div>
<div class="line">semilogy(<a class="code" href="classitpp_1_1bin.html#a027ed809cea118591a0bf7943374c566">abs</a>(ch_coeffs(1:200)))</div>
</div><!-- fragment --><p>Note: Make sure that the folder <code>$PREFIX/share/itpp</code> is included your Matlab/Octave path variable (<code>$PREFIX</code> is the IT++ installation prefix: <code>/usr/local</code> by default). </p>
</div></div><!-- contents -->
<div style="clear: both; width: 100%; height: 31px; background-color: #ffff00; border: 1px solid #b0b0b0; margin: 5px 5px 5px 0; padding: 2px;">
<a href="http://sourceforge.net"><img src="http://sourceforge.net/sflogo.php?group_id=37044&type=1" alt="SourceForge Logo" style="float: right; border: 0;"></a>
<p style="padding-left: 10px; font-size: 85%;">Generated on Sat Mar 22 2014 05:34:27 for IT++ by <a href="http://www.doxygen.org/index.html">Doxygen</a> 1.8.6</p>
</div>
</body>
</html>
|