Can I Create a Pattern with Alternating 1's and 0's in Mathematica?

  • Topic: Mathematica 
  • Thread starter Thread starter Sarah rob
  • Start date Start date
  • Tags Tags
    Generator Mathematica
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
Sarah rob
Messages
16
Reaction score
0
I am using
co = 0;
co++
If[Mod[co, 20, 1] > 10, 1, 0];
which is used in an iterative function
which produces 10 1' s 10 0' s, 10 1' s 10 0' s and so on ...
Could I use a similar method to produce 10 1' s then 5 0' s, 10 1's 5 0' s and so on...
 
Physics news on Phys.org