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

📄 vblast_main.m

📁 自适应滤波原理_西蒙.赫金_Matlab_源代码 希望能够对学习自适应滤波技术的朋友有所帮助
💻 M
字号:
function out=vblast_main(dummy)
%Routine to perform optimal order decoding for vblast

clear; clc;

global nTx nRx modtype Mary

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Lsnr = 12;
Usnr = 15;
nTx = 2;
nRx = 2;
modtype = 'psk';    %'psk' or 'qask'
Mary = 4;           %Constellation size (how many symbols in the set)
nsymb = 1e4;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tic
fname = sprintf('VBlast_%d_by_%d-%d_%s',nTx,nRx,Mary,modtype)
%Write to file to show routines' progress
fid = fopen([fname '.txt'],'w');
fprintf(fid,'Starting Simulation \n');
fclose(fid);
nblocks = floor(nsymb/nTx);
ser = zeros(Usnr-Lsnr+1,1);
[symb,Smap]=psk_gen(Mary);
for snr = Lsnr:Usnr,
    %Write to file to show routines' progress
    fid = fopen([fname '.txt'],'a');
    fprintf(fid,'Lower SNR: %d, Current SNR: %d, Upper SNR: %d, Elapsed Time: %6.0f \n',Lsnr,snr,Usnr,toc);
    fclose(fid);
    error = 0;
    for B = 1:nblocks,
        [err] = vblast_decode(snr,Smap);
        error = error + err;
    end
    ser(snr-Lsnr+1) = error/(nblocks*nTx);
end
fid = fopen([fname '.txt'],'a');
fprintf(fid,'FINISHED!!!   Total Elapsed Time: %6.0f\n',toc)    
fclose(fid);
save(fname)
out=1;
figure(8)
vec = Lsnr:Usnr;
semilogy(Lsnr:Usnr,ser,'b*-')

⌨️ 快捷键说明

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