Borrar filtros
Borrar filtros

how to generate a pattern

2 visualizaciones (últimos 30 días)
Duncan
Duncan el 23 de Ag. de 2014
Respondida: Star Strider el 23 de Ag. de 2014
I would like to generate all the possible combinations
for example:
[1 2 3 4 5]
I want to generate a reordered version of the original:
[2 3 4 5 1;
3 4 5 1 2;
4 5 1 2 3;
5 1 2 3 4]
how should i do that?

Respuestas (1)

Star Strider
Star Strider el 23 de Ag. de 2014
If you have the Statistics Toolbox, use the combnk function. Otherwise, use Matt Fig’s File Exchange contribution combinator.

Categorías

Más información sobre Matrices and Arrays en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by