zoukankan      html  css  js  c++  java
  • CCS

    Matlab Coding

     

     
    
    
    
     1 % MATLAB script for Illustrative Problem 10.2.
     2 echo on
     3 pn0_db=[-20:0.1:30];
     4 pn0=10.^(pn0_db./10);
     5 capacity=3000.*log2(1+pn0/3000);          # equation 10.2.5
     6 pause % Press a key to see a plot of channel capacity vs. P/N0.
     7 clf
     8 semilogx(pn0,capacity)
     9 title('Capacity vs. P/N0 in an AWGN channel')
    10 xlabel('P/N0')
    11 ylabel('Capacity (bits/second)')
    12 clear
    13 w=[1:10,12:2:100,105:5:500,510:10:5000,5025:25:20000,20050:50:100000];
    14 pn0_db=25;
    15 pn0=10^(pn0_db/10);
    16 capacity=w.*log2(1+pn0./w);              # equation 10.2.5
    17 pause % Press a key to see a plot of channel capacity vs. bandwidth.
    18 clf
    19 semilogx(w,capacity)
    20 title('Capacity vs. bandwidth in an AWGN channel')
    21 xlabel('Bandwidth (Hz)')
    22 ylabel('Capacity (bits/second)')


    Simulation Result
      a plot of channel capacity vs. P/N0
      
      
      a plot of channel capacity vs. bandwidth
      

    Reference,

      1. <<Contemporary Communication System using MATLAB>> - John G. Proakis

  • 相关阅读:
    hive on hbase
    django多表操作
    django单表操作
    django模板
    django路由初识
    python 相关模块安装 国内镜像地址
    django初识
    Python中属性和描述符的简单使用
    pip安装包(python安装gevent(win))
    jQuery 事件方法
  • 原文地址:https://www.cnblogs.com/zzyzz/p/13747246.html
Copyright © 2011-2022 走看看