how to pass the gamma function to for loop

2 vues (au cours des 30 derniers jours)
Marco Schwanz
Marco Schwanz le 22 Mai 2018
I need to pass the series included in the derivative of the gamma function from euler to for loop

Réponses (1)

Walter Roberson
Walter Roberson le 22 Mai 2018
You do not pass functions to for loops. You can only pass something (anything) to a function.
fun = @gamma;
val = 1;
for K = 1 : 10
val = val * fun(K^2);
end

Catégories

En savoir plus sur Gamma Functions 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!

Translated by