i want to get a combination from a table of cell by fonction (combntns), but i dosen't work ,anyone can help me ,thank you

1 次查看(过去 30 天)
C={'2222222','33333333','444444444'} i want to get like this:'2222222' '3333333333' '2222222' '4444444444' '3333333' '4444444444'

采纳的回答

Guillaume
Guillaume 2014-10-6
Is this what you want ?
C={'2222222','33333333','444444444'};
nchoosek(C, 2)

更多回答(1 个)

Thorsten
Thorsten 2014-10-6
pairs = nchoosek(1:3,2)';
{C{pairs(:)}

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by