Shift a column circularly in a for loop

1 回表示 (過去 30 日間)
numnum
numnum 2017 年 12 月 21 日
コメント済み: numnum 2017 年 12 月 21 日
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 件のコメント
numnum
numnum 2017 年 12 月 21 日
nervermind, i got it!

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Translated by