Repeat some elements in a vector
Mostrar comentarios más antiguos
clear all;
u={'High';'M';'LOW'}
y=repelem(u(1:3),2)
% would like the output y=[high;M;LOW;high;M;Low]
I am trying to use repelem but I repeat the element it self n number of times not as I mentioned before
I would like to repeat al the u 2 times with the same sequence
Thanks,
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Elementary Math en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!