How to plot summation 0 to inf for ((gamma(n+​1.54)*gamm​a(n+1))/fa​ctorial (n)) * KummerU (n+1.54, k, ((k*m)/snr​))*((incom​plete gamma(n+2,​13.36/2)/g​amma(n+2))​) for various snr?

1 次查看(过去 30 天)
How to plot summation 0 to inf for ((gamma(n+1.54)*gamma(n+1))/factorial (n)) * KummerU (n+1.54, k, ((k*m)/snr))*((incomplete gamma(n+2,13.36/2)/gamma(n+2))) for various snr?

回答(1 个)

Yash
Yash 2023-12-21
Hello Aakanksha,
To plot the summation for the given expression, you can use a for-loop to calculate the value for each snr and then plot the results. You can use a 'snr_values' array that defines the range of snr values for which you want to calculate the summation. Further, you can use nested loops that iterate over each snr value and each 'n' value to calculate the expression and store the results in the 'result' array. Finally, use the 'plot' function to plot the results.
Here's a sample code, in this I have considered a simple function given by (n + snr). You can replace your summation function accordingly and store the value in result matrix.
% Define the range of snr values
snr_values = 1:5;
% Define the range of n values
n_values = 0:10;
% Initialize arrays to store the results
result = zeros(length(snr_values), length(n_values));
sum_value = zeros(length(snr_values));
% Calculate the summation for each snr value
for i = 1:length(snr_values)
snr = snr_values(i);
for j = 1:length(n_values)
n = n_values(j);
% Calculate the expression and store the result
result(i, j) = n + snr; % NOTE: Replace your own summation function here
end
sum_value(i) = sum(result(i,:));
end
% Plot the results
figure
plot(snr_values, sum_value)
xlabel('SNR (dB)')
ylabel('Summation')
You can modify the range of 'n' values or 'snr' values in the plot as per the communication channel you want to simulate. In the provided code, the range of 'n' values is defined by the 'n_values' array, and the range of 'snr' values is defined by the 'snr_values' array.
To know more about the functions used, you can refer to the documentations here:
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Graphics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by