I have an array that can be simplified to something like this:
a=[nan, 2, 1, 1, nan, nan, 3, nan, nan, 3, 4, 7, 8, 9, 8, 7, 7, nan, nan, nan, 3, 2, nan, 2]
I would like to keep the elements 3, 4, 7, 8, 9, 8, 7, 7
the nan
elements don't bother me because they don't show up in the graphic, but I would like to filter the rest of the values.
Criteria: Longest sequence without a nan