freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

通信原理基于matlab的計算機(jī)仿真-資料下載頁

2025-06-20 08:10本頁面
  

【正文】 n(pi*t/Ts)/(pi*t/Ts)波形,截段取10個碼元gt3 = mt3(1:10*N_sample)。 d = ( sign( randn(1,N) ) +1 )/2。data = sigexpand(d,N_sample)。 %對序列間隔插入N_sample1個0 st1 = conv(data,gt1)。st2 = conv(data,gt2)。d = 2*d1。 %變成雙極性序列data= sigexpand(d,N_sample)。 st3 = conv(data,gt3)。 xt = st1。%無失真信道[f,xf] = T2F(t,xt)。hf1 = exp(j*pi*f)。yf1 = xf.*hf1。[t1,yt1] = F2T(f,yf1)。 %幅頻失真信道hf2 = sinc(f).*exp(j*pi*f)。yf2 = xf.*hf2。[t2,yt2] = F2T(f,yf2)。%相頻失真、群時延無失真信道%hf3 = exp(j*pi*f+j**pi)。f1 = find(f0)。 hf3 = exp( j*pi*f+j*pi )。hf3(f1) = exp( j*pi*f(f1)j*pi )。 yf3 = xf.*hf3。[t3,yt3]=F2T(f,yf3)。%相頻、群時延失真信道hf4 = exp(j*pi*f.*fj*pi*f+j*pi)。yf4 = xf.*hf4。[t4,yt4]=F2T(f,yf4)。s figure(1)subplot(221)plotyy(f,abs(hf1),f,angle(hf1)/pi)。ylabel(39。幅頻、相頻特性39。)。title(39。線性無失真信道39。)。grid on。 subplot(222)plot(t1,real(yt1) )。title(39。經(jīng)過信道后的輸出信號39。)。axis([0,20, ])。grid on。 subplot(223)plotyy(f,abs(hf2),f,angle(hf2)/pi)。ylabel(39。幅頻、相頻特性39。)。title(39。幅頻失真信道39。)。grid on。 xlabel(39。f39。) subplot(224)plot(t2,real(yt2))。 axis([0,20, ])。grid on。xlabel(39。t39。)。 figure(2)subplot(221)。plotyy(f,abs(hf3),f,angle(hf3)/pi)。ylabel(39。幅頻、相頻特性39。)。title(39。相頻失真、群時延無失真信道39。)。grid on。subplot(222)。plot(t3,real(yt3))。title(39。經(jīng)過信道后的輸出信號39。)。axis([0,20, ])。grid on。 subplot(223)plotyy(f,abs(hf4),f,angle(hf4)/pi)。ylabel(39。幅頻、相頻特性39。)。title(39。相頻失真、群時延失真信道39。)。grid on。xlabel(39。f39。)。subplot(224)。plot(t4,real(yt4))。axis([0,20, ])。grid on。xlabel(39。t39。)。例 31clear all。close all。Ts=1。N_sample = 8。 %每個碼元的抽樣點(diǎn)數(shù)dt = Ts/N_sample。 %抽樣時間間隔N = 1000。 %碼元數(shù)t = 0:dt:(N*N_sample1)*dt。dLen = length(t)。gt1 = ones(1,N_sample)。 %NRZ非歸零波形d = ( sign( randn(1,N) ) +1 )/2。data = sigexpand(d,N_sample)。 %對序列間隔插入N_sample1個0st1 = conv(data,gt1)。[f sf1] = T2F(t,st1(1:dLen))。 %3徑信道m(xù)=[ ]。tao =[ 0 1 2]。hf = m(1)*exp(j*2*pi*f*tao(1)) +m(2)* exp(j*2*pi*f*tao(2))+... m(3)* exp(j*2*pi*f*tao(3))。%信號經(jīng)過3徑信道yt1 = m(1)*st1(1:dLen)+m(2)*[zeros(1,N_sample), st1(1:dLenN_sample)]+... m(3)*[zeros(1,2*N_sample), st1(1:dLen2*N_sample)]。[f yf1] = T2F(t,yt1)。figure(1)subplot(221)plot(t,st1(1:dLen),39。LineWidth39。,2)。axis([20 40 0 ])。title(39。輸入信號39。)。subplot(223)plot(t,yt1,39。LineWidth39。,2)。axis([20 40 0 2])。title(39。經(jīng)過信道輸出信號39。)。xlabel(39。t39。)。subplot(222)。plot(f,abs(sf1),39。LineWidth39。,2)。axis([2 2 0 60])。title(39。輸入信號幅度譜39。)。subplot(224)。plot(f,abs(yf1),39。LineWidth39。,2)。axis([2 2 0 60])。title(39。輸出信號幅度譜39。)。xlabel(39。f39。)。figure(2)subplot(211)plot(f,abs(hf),39。LineWidth39。,2)。axis([2 2 0 2])。title(39。信道幅頻特性39。)。xlabel(39。f39。)。subplot(212)plot(f,angle(hf)/pi)。title(39。信道相頻特性39。)。xlabel(39。f39。)。axis([2 2 1 1])。例3 2%(7,4)分組碼clear all。 close all。H = [1 1 1 0 1 0 0。... 0 1 1 1 0 1 0。... 1 1 0 1 0 0 1]。 G = gen2par(H)。 %調(diào)用Matlab函數(shù)求與H對應(yīng)的生成矩陣GMsg = [0 0 0 0。0 0 0 1。0 0 1 0。0 0 1 1。0 1 0 0。0 1 0 1。0 1 1 0。0 1 1 1。... 1 0 0 0。1 0 0 1。1 0 1 0。1 0 1 1。1 1 0 0。1 1 0 1。1 1 1 0。1 1 1 1]。C = rem(Msg*G,2)。 E = dec2bin([0:2^71],7)48。 %調(diào)用Matlab函數(shù)將整數(shù)轉(zhuǎn)換成比特表示S = rem(H*E39。,2)。 %不同的E對應(yīng)的校驗子S %對校驗子歸類,每個S對應(yīng)不同的16個Es = S(1,:)*4+S(2,:)*2+S(3,:)。for k=1:8 e(k,:)=find(s==k1)。ende0 = dec2bin( e(1,:)1,7 )48。 %對應(yīng)S=000的E,編碼碼字e1 = dec2bin( e(2,:)1,7 )48。 %對應(yīng)S=001的Ee2 = dec2bin( e(3,:)1,7 )48。 %對應(yīng)S=010的Ee3 = dec2bin( e(4,:)1,7 )48。 %對應(yīng)S=011的Ee4 = dec2bin( e(5,:)1,7 )48。 %對應(yīng)S=100的Ee5 = dec2bin( e(6,:)1,7 )48。 %對應(yīng)S=101的Ee6 = dec2bin( e(7,:)1,7 )48。 %對應(yīng)S=110的Ee7 = dec2bin( e(8,:)1,7 )48。 %對應(yīng)S=111的E例 33%卷積碼的性能,(7,5), R=1/2clear all。close all。R=1/2。EbN0dB = 0:6。%BPSK調(diào)制EsN0dB = EbN0dB 10*log10(R)。N0 = 10.^(EsN0dB/10)。 %求AWGN信道的單邊功率譜密度sigma = sqrt(N0/2)。 %卷積碼的結(jié)構(gòu)trellis = poly2trellis(3,[7,5])。error = zeros(1,length(N0))。for k=1:length(N0) n = 0。 while n100 %每個信噪比下,仿真幀長=1000 %信源產(chǎn)生 d1 = (sign(randn(1,1000))+1)/2。 d = [d1 zeros(1,2)]。 %添加尾比特使編碼后狀態(tài)歸0 %卷碼編碼 s = convencoder(d,trellis)。 %BPSK、經(jīng)過AWGN信道 r = (2*s1) + sigma(k)*randn(1,length(s))。 %譯碼 dd = viterbi(r,trellis)。 %誤碼計數(shù) error(k) = error(k) + sum( abs( dd(1:length(d1)) d1) ) n = n+1。 %計數(shù)仿了多少幀 end ber(k) = error(k)/(n*1000)。endsemilogy(EbN0dB,ber)。function [out] = convencoder(din,trellis)%卷積碼編碼器%輸入:din {0,1}序列碼流% trellis Matlab格式網(wǎng)格結(jié)構(gòu)(可以用poly2trellis獲得)%初態(tài)為0curState = 0。for k=1:length(din) d(k) = ( curState+1,din(k)+1 )。 curState = ( curState+1, din(k)+1 )。end N = floor( log2() )。out = dec2bin(d,N)48。out = reshape(out39。,1,N*length(din))。function [out] = viterbi(r,trellis)%軟判決譯碼方式,2PSK,有尾比特歸0N = log2()。L = length(r)/N。numStates = 。numInputs = 。 cur_metric= zeros(1,numStates)+Inf。cur_metric(1)=0。next_metric = ones(1,numStates)。path = zeros(numStates,L)。sur_path = zeros(numStates,L)。for k=1:L %譯碼時刻 for st = 1:numStates %狀態(tài) for i=0:numInputs1 %輸入 dout = dec2bin( (st,i+1),N ) 48。 dout = 2*dout1。 dist = sum( (r((k1)*N+1:k*N) dout ).^2 )。 %計算歐式距離s nextState = (st,i+1) +1。 x = cur_metric(st) + dist。 if next_metric(nextState)0 %判斷下一狀態(tài)是否新寫入? next_metric(nextState) = x。 sur_path(nextState,1:k) = [path(st,1:k1) i]。 else if x next_metric(nextState) %比較,輸入支路的度量 next_metric(nextState) = x。 sur_path(nextState,1:k) = [path(st,1:k1) i]。 end end end end cur_metric = next_metric。 next_metric = ones(1,numStates)。 path = sur_path。endout = path(1,:)。例 34%m序列發(fā)生器及其自相關(guān) clear all。 close all。g = 19。 % G = 10011state = 8。% state=1000L = 1000。 %m序列產(chǎn)生N = 15。mq = mgen(g,state,L)。 %求序列自相關(guān)m
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1