I have an array of double values containing negative and positive numbers (eg. -2.5 -4 -6 0 1 -2.4 3 7.1 5 -1).
I want to sort this into smaller arrays of continuous positive and negative numbers
so from the array above, i d like to create [-2.5 -4 -6 ] [1] [-2.4] [3 7.1 5] [-1].
How do i implement this in Matlab