code a series using matlab that involve Pochhamer sumbol
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Muna Tageldin
le 3 Mar 2022
Modifié(e) : Muna Tageldin
le 3 Mar 2023
I am trying to model the following series using matlab code but I dont know how to approach it
$\sum_{i=1}^n \frac {n!} {(n-i)!(\lambda- \mu)(\lambda-2 \mu)....(\lambda- i\mu)}$
I know that
is a Pochhamer sumbol. I want to be able to represent the following series in Matalb using vectorization
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1313500/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1313505/image.png)
In particular, the above series can be coded in MATLAB as:
i = 1:n;
y =factorial(n)./(factorial(n-k).*prod(1./(lam-u.*(1:k))));
result=sum(y);
but this doesnt work. Any suggestions?
0 commentaires
Réponse acceptée
David Hill
le 3 Mar 2022
If lam and u are not going to change, you could compute the series for the largest n as follows:
for m=1:18
p(m)=prod(lam-(1:m)*u);
end
Then the rest can be vectorized.
y=sum(factorial(n)./factorial(n-(1:n))./p(1:n);
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!