フィルターのクリア

Need Urgent Help

1 回表示 (過去 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 Center および File ExchangeANOVA についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by