Construct a permutation matrix from two vectors
19 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (1)
Bruno Luong
on 23 Mar 2023
Edited: Bruno Luong
on 23 Mar 2023
combinations, new stock function in R2023a
a = [1 ; 2 ; 3];
b = [4 ; 5 ; 6];
combinations(a,b)
0 Comments
See Also
Categories
Find more on Multidimensional Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!