Repeat some elements in a vector
Mostra commenti meno recenti
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,
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Elementary Math in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!