?? pr10_20.m
字號:
%Problem 10.20;
%Exploring MC-CDMA peak-factor;
clear all; close all;
N=256; %number of users;
A1=hadamard(N)/sqrt(N); %MC Walsh signature set (in frequency domain);
a=exp(pi*i*([0:N-1].^2)/N); A2=a'; %Chu sequence;
for k=1:N-1
A2=[A2,circshift(a',k)]; %MC signature set of shifted Chu sequences;
end;
A=A1; %choose MC signature set
ofdm=ifft(A); %samples of all signatures;
t=[-29:1:29]*0.1;
snc=sin(pi*t)./(pi*t+eps); %interpolator weight;
ofdm=kron(ofdm,[1,zeros(1,9)]'); %subsampling: adding 9 zeros to every signature element to further fulfill interlpolation;
ofdms=filter(snc,1,ofdm); %interpolation of OFDM signatures;
L=size(ofdms,1); t=[0:L-1]/L;
subplot(221); plot(t,abs(ofdms(:,1))); ylabel('OFDM signtr 1');
subplot(222); plot(t,abs(ofdms(:,2))); ylabel('OFDM signtr 2');
subplot(223); plot(t,abs(ofdms(:,floor(N/2)))); ylabel('OFDM signtr N/2'); xlabel('t/Tb');
subplot(224); plot(t,abs(ofdms(:,N))); ylabel('OFDM signtr N'); xlabel('t/Tb'); %plots four OFDM signatures in time domain;
PF=(size(ofdms,1))*max((max(abs(ofdms)).^2)./sum(abs(ofdms).^2));
fprintf('\n'); fprintf(['peak factor nu=',num2str(PF)]); fprintf('\n');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -