Does Matlab have a permutation operator?

1 vue (au cours des 30 derniers jours)
Amanda Chun
Amanda Chun le 14 Mar 2018
Modifié(e) : Stephen23 le 14 Mar 2018
I just want to perform the operation
10! = 10*9*8*7*6*5*4*3*2*1,
but I can only find permutations relating to the obtaining all combinations of a vector. Is there simply an operations defined in matlab for this? Thank you!
  1 commentaire
Stephen23
Stephen23 le 14 Mar 2018
Modifié(e) : Stephen23 le 14 Mar 2018

Connectez-vous pour commenter.

Réponse acceptée

Birdman
Birdman le 14 Mar 2018
Modifié(e) : Birdman le 14 Mar 2018
There is a built-in function called factorial:
>>factorial(10)
ans=
3628800
  1 commentaire
Amanda Chun
Amanda Chun le 14 Mar 2018
thank you so much!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Function Creation 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