How can I make a vector of a repeating sequence
이전 댓글 표시
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?
채택된 답변
추가 답변 (1개)
David Fletcher
2018년 3월 21일
편집: David Fletcher
2018년 3월 21일
repmat([0 0 0 1],1,40)
댓글 수: 1
Jan
2018년 3월 22일
This is much more efficient than a loop.
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!