repeat an element in a vector
Mostra commenti meno recenti
Hi all,
I have one vector and i wish to repeat the first element of the vector once at the very beginning.
For example:
n = [1 2 3 4 5 6 7 8 9]
to
n = [1 1 2 3 4 5 6 7 8 9]
Thank you all.
1 Commento
Sriram Tadavarty
il 27 Mar 2020
how about using
n = [n(1) n];
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Physics 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!