How to Extend a Matrix Periodicly?

1 visualización (últimos 30 días)
dieter alfred
dieter alfred el 18 de Jul. de 2020
Respondida: madhan ravi el 18 de Jul. de 2020
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.

Respuesta aceptada

madhan ravi
madhan ravi el 18 de Jul. de 2020
repmat(a, 1, PerioD)

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by