How can I label a vector?
이전 댓글 표시
Hello,
I have a vector of 10 random numbers. I want to label the first 5 elements in the vector as '1'. I want to label the last 5 elements in the vector as '0'. How can I do this?
Thanks!
채택된 답변
추가 답변 (1개)
madhan ravi
2018년 11월 29일
편집: madhan ravi
2018년 11월 29일
x(1:5)=1; % where x is your random vector
x(end-4:end)=0;
카테고리
도움말 센터 및 File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!