Construct a permutation matrix from two vectors
22 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Lama Hamadeh
am 23 Mär. 2023
Bearbeitet: Bruno Luong
am 23 Mär. 2023
Hi,
If I have two vectors:
a = [1 ; 2 ; 3];
b = [4 ; 5 ; 6];
How can I constrcut a matrix that has the shape of:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1334400/image.png)
Thanks.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Bruno Luong
am 23 Mär. 2023
Bearbeitet: Bruno Luong
am 23 Mär. 2023
combinations, new stock function in R2023a
a = [1 ; 2 ; 3];
b = [4 ; 5 ; 6];
combinations(a,b)
0 Kommentare
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!