I have A(21,147) matrix.i need to create a loop for column of matrix A.this column ranges only a weekly period and i want to achieve that 21 column and each ones sequence start from 1 to 7. How can I do that ?

Respuestas (1)

Stephen23
Stephen23 el 30 de Jul. de 2018
Editada: Stephen23 el 30 de Jul. de 2018

0 votos

>> vec = 1:21;
>> 1+mod(vec(:)-1,7)
ans =
1
2
3
4
5
6
7
1
2
3
4
5
6
7
1
2
3
4
5
6
7

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 30 de Jul. de 2018

Editada:

el 30 de Jul. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by