create a vector of 0 and 1s that takes 1 at a fixed interval
7 次查看(过去 30 天)
显示 更早的评论
I would like to create a vector of 0s that takes 1 at a given (m) interval. For example, if m=2, the vector will be like
0,0,1,0,0,1,0,0,1,...
what will be a simpler way to create such vector?
0 个评论
采纳的回答
更多回答(2 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!