Factorial of a number up to n

3 views (last 30 days)
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

Accepted Answer

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

More Answers (1)

Matt J
Matt J on 27 Apr 2019
Edited: Matt J on 27 Apr 2019

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!