How can I make a vector of a repeating sequence
Ältere Kommentare anzeigen
I want to make a vector with 40 repeats of [0 0 0 1] in a column so it would look like this: 0 0 0 1 0 0 0 1 (0 0 0 1)x40
How would I be able to make this?
Akzeptierte Antwort
Weitere Antworten (1)
David Fletcher
am 21 Mär. 2018
Bearbeitet: David Fletcher
am 21 Mär. 2018
repmat([0 0 0 1],1,40)
1 Kommentar
Jan
am 22 Mär. 2018
This is much more efficient than a loop.
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!