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!