vendredi 4 mai 2018

How to split and array in python according to conditional statement

I have a time signal (37913 ms to 40010) and i want to split it in every 20 ms gap.

for example for first 20 ms

for t in time:
    if t>=37913 and t< 37933:
        list1.append(t)

this gives me a list [37913.496549, 37916.878267, 37918.506757]

i want to make several different lists on every 20 ms gap. I know it should be really simple but somehow i cannot think of a solution. Thanks for you time

Aucun commentaire:

Enregistrer un commentaire