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

📄 res_pdf_may22.m

📁 基于OFDM的无线宽带系统仿真It contains mainly two parts, i.e. link-level simulator and system-level simulator.
💻 M
字号:
% PDF of allocated bit, coding rate, rate, per block throughputclear all;close all;clcfor steps = 1:2    close all%%switch steps    case 1    figdir = 'RRPFMX';    MIMO = {'SISO','SISO','SISO','SISO','SISO','SISO'};    LARArate = [1 1 1 1 1 1];    test_resource_allocation_idx = [1 1 2 2 3 3];    case 2    figdir = 'PFmore';    MIMO = {'SISO','SISO','SISO','SISO','MRC','MRC'};    LARArate = [1 1 2 2 1 1];    test_resource_allocation_idx = [2 2 2 2 2 2];end%%loaddir = '..';UE = [4 10 4 10 4 10];RAs = {'RR','PF','MX'};tmp1 = [0 0.6667 1.0000 1.3333 2.0000 2.6667 3.0000 4.0000];xlims = {(0:2:6), [0 1/3 1/2 2/3],tmp1,tmp1 * 6 * 12 / 5e-4};datas = {'save_bs_mod','save_bs_fec','save_bs_rate','save_bs_TPblk'};for file_idx  = 1:6    file_idx    LGD{file_idx} = [RAs{test_resource_allocation_idx(file_idx)},',UE',num2str(UE(file_idx)),',F',num2str(LARArate(file_idx)),',',MIMO{file_idx}];    filename = ['RA',num2str(test_resource_allocation_idx(file_idx)),'_UE',num2str(UE(file_idx)),'_LARA',num2str(LARArate(file_idx)),MIMO{file_idx},'.mat'];    load([loaddir,'/',filename],'save_bs_mod','save_bs_fec','save_bs_FrminErr');    save_bs_rate = double(save_bs_mod) .* save_bs_fec;    save_bs_TPblk = save_bs_rate .* double(~save_bs_FrminErr) * 6 * 12 / 5e-4;    for data_idx = 1:4        tmpV = eval(datas{data_idx});        xx=reshape(tmpV,[],1);        [N{data_idx,file_idx}, X{data_idx,file_idx}] = hist(xx,xlims{data_idx});    endendsave(['PDF',num2str(steps),'.mat'],'X','N','LGD');%%load(['PDF',num2str(steps),'.mat'],'X','N','LGD');k = 0;desps1 = {'mod','fec','rate','TPblk'};desps2 = {'Allocated Bits','Allocated Coding Rate','Allocated Rate','Per Block Throughput'};for data_idx = 1:4    clear N1 X1    for file_idx = 1:6        N1(:,file_idx) = N{data_idx,file_idx};        X1(:,file_idx) = X{data_idx,file_idx};    end    Y = N1 ./ repmat(sum(N1,1),size(N1,1),1);    k = k + 1;    cfigure(k);    bar(X1,Y,1);%bar3(X1(:,1),Y,1));    colors = [0.5 0.5 0.5;0 0 0;0 0.5 1;0 0 1;1 0 0.5;1 0 0];    colormap(colors);    grid on; grid minor;    ylim([min(min(Y)) 1.1 * max(max(Y))]);    lgd = legend(LGD);    set(lgd,'Location','North','FontSize',14,'Box','on','fontname','times','FontWeight','normal');    xlabel(desps2{data_idx},'fontname','times','FontSize',14,'FontWeight','b');    ylabel(['PDF of ',desps2{data_idx}],'fontname','times','FontSize',14,'FontWeight','b');    figname{data_idx} = ['PDF_of_',desps1{data_idx}];    savefigs(figname{data_idx},figdir);endend

⌨️ 快捷键说明

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