i’m computing indices into an array such that i would have two vectors, e.g. i1, i2
i1 = [2,3,5]
i2 = [5,7,9]
and i will use them to index into a 3 dimensional array to set a value throughout the range dictated by i1 & i2. I could simply do the following
a[i1[1]:i2[1], i1[2]:i2[2], i1[3]:i2[3]] .= x
I’m wondering if there is a more clever way to do it.