Factorial of a number up to n

4 visualizaciones (últimos 30 días)
Kelton Santiago
Kelton Santiago el 27 de Abr. de 2019
Comentada: Kelton Santiago el 27 de Abr. de 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

Respuesta aceptada

madhan ravi
madhan ravi el 27 de Abr. de 2019
prod(7:-1:4)

Más respuestas (1)

Matt J
Matt J el 27 de Abr. de 2019
Editada: Matt J el 27 de Abr. de 2019

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by