combination problem

2 次查看(过去 30 天)
Hi suppose I have some values 1 2 3 4.
I want to find all possible combination of these four, taking only two distinct element at a time and store it in a matrix. Is there any one to help me?

采纳的回答

Andrei Bobrov
Andrei Bobrov 2011-9-12
It's like?
out = nchoosek(1:4,2)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by