Whats wrong with this code?
古いコメントを表示
N = 25;
sigmaratio = 0.01;
PD = zeros(1,1000);
SNR = zeros(1,1000);
PF = 0.00001;
count = 0;
for sigmaratio=0.01:0.01:10
count=count+1;
TH = sqrt(sigmaratio/N) * chi2inv(PF);
SNR(count) = 10*log10(sigmaratio);
PD(count) = chi2cdf(PF)*(TH/(sigmaratio+1));
end
figure;
plot(SNR, PD, 'b-');
xlabel('Signal to noise ratio(DB)');
ylabel('Probability of detection, PD');
hold on;
PF = PF*10;
count = 0;
for sigmaratio=0.01:0.01:10
count=count+1;
TH = sqrt(sigmaratio/N) * chi2inv(PF);
PD(count) = chi2cdf(PF)*(TH/(sigmaratio+1));
end
plot(SNR, PD, 'b-');
hold on;
PF = PF*10;
count = 0;
for sigmaratio=0.01:0.01:10
count=count+1;
TH = sqrt(sigmaratio/N) * chi2inv(PF);
PD(count) = chi2cdf(PF)*(TH/(sigmaratio+1));
end
plot(SNR, PD, 'b-');
hold on;
PF = PF*10;
count = 0;
for sigmaratio=0.01:0.01:10
count=count+1;
TH = sqrt(sigmaratio/N) * chi2inv(PF);
PD(count) = chi2cdf(PF)*(TH/(sigmaratio+1));
end
plot(SNR, PD, 'b-');
hold on;
PF = PF*10;
count = 0;
for sigmaratio=0.01:0.01:10
count=count+1;
TH = sqrt(sigmaratio/N) * chi2inv(PF);
PD(count) = chi2cdf(PF)*(TH/(sigmaratio+1));
end
plot(SNR, PD, 'b-');
hold on;
1 件のコメント
Stephen23
2016 年 7 月 20 日
"Whats wrong with this code?"
No comments, no explanation, no introduction, no help, no examples, no idea what it should do...
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Just for fun についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
