How to Extend a Matrix Periodicly?

조회 수: 1 (최근 30일)
dieter alfred
dieter alfred 2020년 7월 18일
답변: madhan ravi 2020년 7월 18일
Hello, I want to extend a Matrix Periodicly. I mean this:
a = [1,2,3,4];
period = 4;
and this has to be the result:
a = [1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4]
How is it possible? What I dont want to do is to use some sort of loop.
Because they are very inefficient and slow and I want to realize full vectorization in my Program.
The wextend command wont work for me, because my program has to run in Octave.

채택된 답변

madhan ravi
madhan ravi 2020년 7월 18일
repmat(a, 1, PerioD)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by