Let say I have value `A = [20 35 50 57 78 90 105 120 143]`, `B=[2 40; 45 80; 85 145];`
`A` is position of maximum peak value and `B` is range.
How to identify a number of maximum peak values in every range? 

The answer I want is `[2 3 4]`

Additionally I'd like a cellarray `peak` containing the corresponding peak values:

```
peak = 
      3 x 1 cell:
      [20 35]
      [50 57 78]
      [90 105 120 143]

```