Community Profile

photo

Nicolò Castellani


Last seen: 4 years ago Active since 2020

Statistics

  • Thankful Level 2
  • Thankful Level 1

View badges

Content Feed

View by

Question


How can I count the number of 1 after every element of the vector?
I have this vector of 1 and 0: X= [1 1 1 1 0 0 1 1 0 1 0 1 0 0 1 1] I want to create a vector Y that counts for every element ...

4 years ago | 1 answer | 0

1

answer

Question


How to count the number of 1 between two 0 in a vector?
I have this vector: [0 1 1 1 0 0 1 0 1 1 0 1] I want to create a vector that every time that I have 1 or more consecutive 1 it...

4 years ago | 2 answers | 0

2

answers