How to construct a Row Vector
이전 댓글 표시
I want to construct a row vector, with say, "L zeros", followed by a "1", and then again followed by "L Zeros"
What is the easiest command to do that? For example a= [ (0 0 0 ... L-1(0)) 1 (0 0 0 ... (L-1) 0)]
채택된 답변
추가 답변 (1개)
Make a row zero matrix...and place one at the indices you want....
or
k = repmat([0 0 0 1],1,4)
카테고리
도움말 센터 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!