MATLAB Answers

create a vector of 0 and 1s that takes 1 at a fixed interval

3 views (last 30 days)
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 Comments

Sign in to comment.

More Answers (2)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!