How to create a column combination?

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?

댓글 수: 1

Jan
Jan 2021년 10월 23일
What is the wanted output for [1,2,3; 4,5,6] ?

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2021년 10월 23일

댓글:

Jan
2021년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by