MATLAB で入力された複数組のベクトルの値から、全ての組み合わせを取得するにはどうすればよいですか?
Ältere Kommentare anzeigen
複数組のベクトルの値から、全ての組み合わせを取得する方法を教えてください。
例えば、以下のような 2 組のベクトル a, b があるときは、C のような行列を取得したいです。
(入力ベクトル)
a = 1:3; b = 4:5
(出力させたい結果)
C = [1 4;...
1 5; ...
2 4; ...
2 5; ...
3 4; ...
3 5];
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!