How to create a column combination?

1 次查看(过去 30 天)
Dan Ibarra
Dan Ibarra 2021-10-23
评论: Jan 2021-10-23
I have this matrix:
A=[1 1 1; 2 2 2]
And I want to create the following matrix:
A=[1 1 1; 1 1 2; 1 2 1; 1 2 2; 2 1 1; 2 1 2; 2 2 1; 2 2 2]
Is there any function similar to nshoosek?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Matrices and Arrays 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by