Factorial of a number up to n

3 visualizzazioni (ultimi 30 giorni)
Kelton Santiago
Kelton Santiago il 27 Apr 2019
Commentato: Kelton Santiago il 27 Apr 2019
Hello,
There is a function in matlab to compute a factorial of a number x up to n?
I mean:
- Factorial of 7 up to 4:
7 x 6 x 5 x 4 = 840
- Factorial of 10 up to 7:
10 x 9 x 8 x 7 = 5040

Risposta accettata

madhan ravi
madhan ravi il 27 Apr 2019
prod(7:-1:4)

Più risposte (1)

Matt J
Matt J il 27 Apr 2019
Modificato: Matt J il 27 Apr 2019

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Tag

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by