runpaproversampling.m
来自「正交频分复用的papr仿真」· M 代码 · 共 25 行
M
25 行
%This programming is for PAPR of OFDM.
clear;clc;
%% Parameters for simulink model PAPR_OFDM.
N=1024;%There are N symbols in each frame.
SampTime=1;%The sample time.
OutNum=1e3;%The model has OutNum numbers as output.
StopTime=N*4*SampTime*OutNum;
%% Simulate
J=4;%Oversampling factor.
sim('PAPR_oversampling.mdl');
%Calculation
PAPRInX=4:0.1:13;NumGtPAPR=zeros(1,length(PAPRInX));
for tmp1=4:0.1:13;
tmp3=round(10*(tmp1-4)+1);
for tmp2=1:length(PAPR);
if PAPR(tmp2)>tmp1;
NumGtPAPR(tmp3)=NumGtPAPR(tmp3)+1;
end;
end;
end;
CCDF=NumGtPAPR./length(PAPR);
%% Give a figure of the results.
figure(1);hold on;grid on;
semilogy(PAPRInX,CCDF,'r');
%Programming end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?