When using integral function to calculate MeijerG function, Matlab will get stuck.
古いコメントを表示
When using integral function to calculate MeijerG function, Matlab will get stuck.
Does anyone have same problem?
How can I figure that?
alpha_value = 4.399688384728341;
beta_value = 2.571722827839187;
g_value = 0.749154464911330;
A0 = 0.1172;
hl = 0.9033;
Pt = 3.1632;
Energy_Efficiency = 0.5;
h_rain = 1;
N0 = 1.0e-07;
function pdf = pdf_of_ht(ht, alpha_value, beta_value, g_value, A0, hl)
pdf = alpha_value * beta_value * (g_value^2) / (A0 * hl) / ...
(gamma(alpha_value) * gamma(beta_value)) * ...
meijerG([], [g_value^2], [g_value^2 -1], [alpha_value - 1, beta_value - 1], (alpha_value * beta_value * ht) / (A0 * hl));
end
function pdf = pdf_of_SNR(SNR, alpha_value, beta_value, g_value, A0, hl, Pt, Energy_Efficiency, h_rain, N0)
h_to_SNR = 2 * Pt^2 * Energy_Efficiency^2 * h_rain^2 / N0^2;
ht = sqrt(SNR ./ h_to_SNR);
pdf = pdf_of_ht(ht, alpha_value, beta_value, g_value, A0, hl) .* (1 ./ (2 .* sqrt(SNR * h_to_SNR)));
end
function ber = ber_func(x)
ber = 0.5 * erfc(sqrt(x) / sqrt(2));
end
% Get stuck on the following line
average_ber = integral(@(SNR) ber_func(SNR) .* pdf_of_SNR(SNR, alpha_value, beta_value, g_value, A0, hl, Pt, Energy_Efficiency, h_rain, N0), 0, Inf, 'RelTol',1e-3, 'AbsTol',1e-6);
Thanks a lot
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Polar Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!