Need Urgent Help

11 次查看(过去 30 天)
Sherif
Sherif 2011-3-21
K = 128; % SIZE OF FFT
N = 4; % NUMBER OF SELECTIONS
QPSK_Set = [1 -1 1i -1i];
Phase_Set = [1 -1];
MAX_SYMBOLS = 1e5;
PAPR_Orignal = zeros(1,MAX_SYMBOLS);
PAPR_SLM = zeros(1,MAX_SYMBOLS);
X = zeros(N,K);
Index = zeros(N,K);
for nSymbol=1:MAX_SYMBOLS
Index(1,:) = randi(1,K,length(QPSK_Set))+1;
Index(2:N,:) = randi(N-1,K,length(Phase_Set))+1;
X(1,:) = QPSK_Set(Index(1,:));
Phase_Rot = Phase_Set(Index(2:N,:));
X(2:N,:) = repmat(X(1,:),N-1,1).*Phase_Rot;
x = ifft(X,[],2);
Signal_Power = abs(x.^2);
Peak_Power = max(Signal_Power,[],2);
Mean_Power = mean(Signal_Power,2);
PAPR_temp = 10*log10(Peak_Power./Mean_Power);
PAPR_Orignal(nSymbol) = PAPR_temp(1);
PAPR_SLM (nSymbol) = min(PAPR_temp);
end
[cdf1, PAPR1] = ecdf(PAPR_Orignal);
[cdf2, PAPR2] = ecdf(PAPR_SLM);
semilogy(PAPR1,1-cdf1,'-b',PAPR2,1-cdf2,'-r')
legend('Orignal','SLM')
title('N=4')
xlabel('PAPR0 [dB]');
ylabel('CCDF (Pr[PAPR>PAPR0])');
grid on
when i try to run this script following error is occoured and script was not working....
??? Undefined function or variable 'SLM'.
please do help....its really urgent..and i dont have much time
thank you very very much

采纳的回答

Walter Roberson
Walter Roberson 2011-3-21
Where does the error occur, exactly? The only place that you use SLM is in a quoted string in legend(), which will treat it as a string and not try to execute it.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Test and Measurement 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by