As a follow-up question what if I add another array to the cell below
1 0 1 1 0 1
325 359 410 425 371 448
4 4 4 5 5 5
Now is it possible to give an output separately for out=mean(B(2,logical(B(1,:)))) dependent on whether array 3 == 4 or 5?
Thanks