Summation of a Gamma series

1 vue (au cours des 30 derniers jours)
RAM
RAM le 26 Mai 2023
Modifié(e) : Dyuman Joshi le 3 Juin 2023
I want to plot(x,y) of a function which consists of a gamma function inside a summation.
How do i do that ?

Réponse acceptée

Dyuman Joshi
Dyuman Joshi le 26 Mai 2023
Modifié(e) : Dyuman Joshi le 3 Juin 2023
This requires Symbolic toolbox -
%Defining symbolic variables
syms x n
%summation using symsum()
out = symsum(ExpressionToBeSummed, n, 0, Inf)
You will obtain the sum in terms of the Hypergeometric function - hypergeom
%define final expression
y = 2*exp(-x^2)*out/sqrt(sym(pi))
Use fplot to plot the function y(x)

Plus de réponses (0)

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by