Hello all,
I want to create and use a single variable for subscript range of a multi-dimensional array. I know for a 1D-array I can do:
array=ones(20,1);indices=5:10;array(indices)=0;
I tried something like this for a 3D-array, but it didnt work:
array=ones(10,10,10);indices=[2:5,3:6,4:7];array(indices)=0;
but it didnt work. Is it possible to create a variable that I can use in such manner? Thank you.
Best Answer