Now Thresholded_arrays is one higher dimension than your original array. For example if your original array was 512 x 768 x 3 x 128 (that is, a stack of 128 RGB images each of which is 512 x 768 pixels), then Thresholded_arrays would be 512 x 768 x 3 x 128 x 4, and Thresholded_arrays(:,:,:,:,1) would be YourImageArray thresholded at value 50.
Best Answer