Shift a column circularly in a for loop

1 vue (au cours des 30 derniers jours)
numnum
numnum le 21 Déc 2017
Commenté : numnum le 21 Déc 2017
Hi, I want to shift a column vector (fullmat) circularly, and append to the column vector each time the new column. I want to do this, shifting by 1 each time, several times (101 times) in a for loop. But my code does not seem to work very well.
y5=rand(1,101);
fullmat=y5.';
for idx=1:101
circ = circshift(y5,idx,1);
fullmat= [fullmat; circ];
end
  1 commentaire
numnum
numnum le 21 Déc 2017
nervermind, i got it!

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Special Functions dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by