Filter löschen
Filter löschen

How to list all situation of vector including fix number?

1 Ansicht (letzte 30 Tage)
Yang Chen
Yang Chen am 8 Mär. 2023
Beantwortet: Voss am 8 Mär. 2023
I have a vector made up of 1 to 10, and each number appears one time, like [1,2,3,4,5,,6,7,8,9,10]. I want to know how to list all of case, such as [2,3,4,5,6,7,8,9,10,1] and [1,3,4,5,7,8,9,6,2,10].

Akzeptierte Antwort

Voss
Voss am 8 Mär. 2023
perms(1:10)
ans = 3628800×10
10 9 8 7 6 5 4 3 2 1 10 9 8 7 6 5 4 3 1 2 10 9 8 7 6 5 4 2 3 1 10 9 8 7 6 5 4 2 1 3 10 9 8 7 6 5 4 1 3 2 10 9 8 7 6 5 4 1 2 3 10 9 8 7 6 5 3 4 2 1 10 9 8 7 6 5 3 4 1 2 10 9 8 7 6 5 3 2 4 1 10 9 8 7 6 5 3 2 1 4

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by