フィルターのクリア

How to generate all possible variations of a sequence

7 ビュー (過去 30 日間)
Sumara
Sumara 2021 年 3 月 9 日
回答済み: Walter Roberson 2021 年 3 月 9 日
i have a sequence: GAKJDCBJEDFAHGK
Each letter in the sequence has possible values:
A B C D E F G H I J K
1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
5 5
6 6
How do I write a code that will generate all of the possible compinations of these values for the sequence?
  2 件のコメント
Jan
Jan 2021 年 3 月 9 日
編集済み: Jan 2021 年 3 月 9 日
I do not understand the meaning of this table. What do e.g. the 2 values "6 6" mean?
Sumara
Sumara 2021 年 3 月 9 日
編集済み: Sumara 2021 年 3 月 9 日
Apologies, the table uploaded in a weird fashion.
So variable A can only be the number 1,
Variable B can be values 1 or 2,
variable C can be values 1, 2, 3, 4, 5 or 6,
D 1:4
E 1:2
F 1:2
G 1:4
H 1:6
I 1:2
j 1
K 1:4
and i end the end need all of the possible combinations of the numbers the represent the original character string: GAKJDCBJEDFAHGK

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 3 月 9 日

カテゴリ

Help Center および File ExchangeNumeric Types についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by