MATLAB で入力された複数組のベクトルの値から、全ての組み合わせを取得するにはどうすればよいですか?
Afficher commentaires plus anciens
複数組のベクトルの値から、全ての組み合わせを取得する方法を教えてください。
例えば、以下のような 2 組のベクトル a, b があるときは、C のような行列を取得したいです。
(入力ベクトル)
a = 1:3; b = 4:5
(出力させたい結果)
C = [1 4;...
1 5; ...
2 4; ...
2 5; ...
3 4; ...
3 5];
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!