第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

程序如下:為什么在MATLAB中 Missing variable or function.

程序如下:為什么在MATLAB中 Missing variable or function.

阿晨1998 2023-02-16 18:14:29
function [ output_args ] = Untitled1( input_args )%UNTITLED1 Summary of this function goes here% Detailed explanation goes here%數(shù)據(jù)調(diào)制采用QPSKclear;clc;Signal=rand(1,para*Ns*2)>0.5;%產(chǎn)生0,1隨機(jī)數(shù)列,符號(hào)個(gè)數(shù)為para*2*Ns(子信道個(gè)數(shù)×調(diào)制水平×每個(gè)子信道中有用符號(hào)個(gè)數(shù))for i=1:parafor j=1:Ns*2SigPara(i,j)=Signal(i*j);%串并轉(zhuǎn)換,將隨機(jī)產(chǎn)生的二進(jìn)制矩陣變換為行數(shù)為para,列數(shù)為2*Ns的矩陣endend%進(jìn)行QPSK數(shù)據(jù)調(diào)制,將數(shù)據(jù)分為兩個(gè)通道for j=1:Nsich(:,j)=SigPara(:,2*j-1);qch(:,j)=SigPara(:,2*j);endkmod=1./sqrt(2);ich1=ich.*kmod;qch1=qch.*kmod;x=ich1+qch1.*sqrt(-1); %y=ifft(x); % ich2=real(y); %qch2=imag(y); %%插入保護(hù)間隔ich3=[ich2(fl-gl+1:fl,:);ich2];qch3=[qch2(fl-gl+1:fl,:);qch2];%并串轉(zhuǎn)換ich4=reshape(ich3,1,(fl+gl)*Ns);qch4=reshape(qch3,1,(fl+gl)*Ns);%形成復(fù)數(shù)發(fā)射數(shù)據(jù)TrData=ich4+qch4.*sqrt(-1);%接收機(jī)%加入高斯白噪聲ReData=awgn(TrData,SNR,'measured');%接收端%移去保護(hù)時(shí)隙idata=real(ReData);qdata=imag(ReData);idata1=reshape(idata,fl+gl,Ns);qdata1=reshape(idata,fl+gl,Ns);idata2=idata1(gl+1:gl+fl,:);qdata2=qdata1(gl+1:gl+fl,:);%FFTRex=idata2+qdata2*sqrt(-1);ry=fft(Rex);ReIChan=real(ry);ReQChan=imag(ry);ReIChan=ReIChan/kmod;ReQChan=ReQChan/kmod;%QPSK逆映射for j=1:NsRePara(:,2*j-1)=ReICh7an(:,j);RePara(:,2*j)=ReQChan(:,j);endReSig=reshape(RePara,1,para*Ns*2);%符號(hào)抽樣判決ReSig=ReSig>0.5;figure(2)subplot(211),stem(ReSig(1:20)),grid;subplot(212),stem(Signal(1:20)),grid%End of script file.
查看完整描述

1 回答

?
慕的地10843

TA貢獻(xiàn)1785條經(jīng)驗(yàn) 獲得超8個(gè)贊

function [ output_args ] = Untitled1( input_args )
%UNTITLED1 Summary of this function goes here
% Detailed explanation goes here
%數(shù)據(jù)調(diào)制采用QPSK
clear;
clc; %clc是清除當(dāng)前command區(qū)域的命令,表示清空,看著舒服些 。而clear用于清空環(huán)境變量
SNR=10; % 信噪比
Nfft=128; % 設(shè)置FFT長(zhǎng)度
Ns=6; %設(shè)置一個(gè)禎結(jié)構(gòu)中OFDM信號(hào)的個(gè)數(shù)
para=128;%設(shè)置并行傳輸?shù)淖虞d波個(gè)數(shù)
sr=250000; %符號(hào)速率
br=sr.*2;% 每個(gè)子載波的比特率
gl=32; %保護(hù)時(shí)隙的長(zhǎng)度
Signal=rand(1,para*Ns*2)>0.5;%產(chǎn)生0,1 隨即序列,符號(hào)數(shù)為para*Ns*2
%(子信道個(gè)數(shù)×調(diào)制水平×每個(gè)子信道中有用符號(hào)個(gè)數(shù))
for i=1:para
for j=1:Ns*2
SigPara(i,j)=Signal(i*j);%串并變換
%將隨機(jī)產(chǎn)生的二進(jìn)制矩陣變換為行數(shù)為para,列數(shù)為2*Ns的矩陣
end
end
%QPSK調(diào)制,將數(shù)據(jù)分為兩個(gè)通道
for j=1:Ns
ich(:,j)=SigPara(:,2*j-1);
qch(:,j)=SigPara(:,2*j);
end
kmod=1./sqrt(2);
ich1=ich.*kmod;
qch1=qch.*kmod;
x=ich1+qch1.*sqrt(-1); %頻域數(shù)據(jù)變時(shí)域
y=ifft(x);
ich2=real(y);
qch2=imag(y);
%插入保護(hù)間隔
ich3=[ich2(Nfft-gl+1:Nfft,:);ich2];
qch3=[qch2(Nfft-gl+1:Nfft,:);qch2];
%并串變換
ich4=reshape(ich3,1,(Nfft+gl)*Ns);
qch4=reshape(qch3,1,(Nfft+gl)*Ns);
%形成復(fù)數(shù)發(fā)射數(shù)據(jù)
TrData=ich4+qch4.*sqrt(-1);
%接收機(jī)
%加入高斯白噪聲
ReData=awgn(TrData,SNR,'measured');
%接收端
%移去保護(hù)間隔
idata=real(ReData);
qdata=imag(ReData);
idata1=reshape(idata,Nfft+gl,Ns);
qdata1=reshape(qdata,Nfft+gl,Ns);
idata2=idata1(gl+1:gl+Nfft,:);  
qdata2=qdata1(gl+1:gl+Nfft,:);  
%FFT
Rex=idata2+qdata2*sqrt(-1);
ry=fft(Rex);
ReIChan=real(ry);
ReQChan=imag(ry);
ReIchan=ReIChan/kmod;
ReQchan=ReQChan/kmod;
%QPSK逆映射
for j=1:Ns
RePara(:,2*j-1)=ReIChan(:,j);
RePara(:,2*j)=ReQChan(:,j);
end
ReSig=reshape(RePara,1,para*Ns*2);
%符號(hào)抽樣判決
ReSig=ReSig>0.5;
figure(1);
subplot(2,1,1),stem(ReSig(1:20)),grid minor;
title('resignal');
xlabel('x'),ylabel('y');
subplot(2,1,2),stem(Signal(1:20)),grid;
title('signal');

你的程序缺好多參數(shù),已補(bǔ)全~

 


查看完整回答
反對(duì) 回復(fù) 2023-02-20
  • 1 回答
  • 0 關(guān)注
  • 142 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)