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

📄 datarate802.16

📁 Ns2下Wimax的代码
💻 16
字号:
#!/bin/bash# Bash file to run datarate simulations for different modulation and cyclic prefix# @author rouilif [ "$1" == "clean" ]; then    rm -r res_datarateelse    mkdir res_datarate    cd res_datarate    #for modulation in "OFDM_BPSK_1_2" "OFDM_QPSK_1_2" "OFDM_QPSK_3_4" "OFDM_16QAM_1_2" "OFDM_16QAM_3_4" "OFDM_64QAM_2_3" "OFDM_64QAM_3_4" ; do    for modulation in "1" "2" "3" "4" "5" "6" "7" ; do		if [ "$1" != "" ]; then	    modulation=$1	fi	mkdir $modulation	cd $modulation	for cp in "0" "0.03125" "0.0625" "0.125" "0.25"; do	    mkdir cp_$cp	    cd cp_$cp	    echo -n "Running for profile " $modulation 	    if [ $modulation == "1" ]; then		echo -n " (OFDM_BPSK_1_2)"	    fi	    if [ $modulation == "2" ]; then		echo -n " (OFDM_QPSK_1_2)"	    fi	    if [ $modulation == "3" ]; then		echo -n " (OFDM_QPSK_3_4)"	    fi	    if [ $modulation == "4" ]; then		echo -n " (OFDM_16QAM_1_2)"	    fi	    if [ $modulation == "5" ]; then		echo -n " (OFDM_16QAM_3_4)"	    fi	    if [ $modulation == "6" ]; then		echo -n " (OFDM_64QAM_2_3)"	    fi	    if [ $modulation == "7" ]; then		echo -n " (OFDM_64QAM_3_4)"	    fi	    echo -n " and CP="$cp	    ns ../../../datarate.tcl $modulation $cp &> log.t		    DATARATE=`grep ^r out.res|grep "1 0 cbr"|awk 'BEGIN{first=-1; last=-1} {if (first==-1) {first=$2}; last=$2; i+=$6-0;} END {print (8*i/(last-first))}'`	    echo " datarate = " $DATARATE	    echo $modulation $cp $DATARATE >>../../result$modulation.dat	    echo $modulation $cp $DATARATE >>../../result.dat	    rm out.res	    rm log.t	    cd ..	done	cd ..	if [ "$1" != "" ]; then	    break	fi    done    cd ..    gnuplot plot-dataratefi

⌨️ 快捷键说明

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