"Luca " <l.presottoRE@MOVE.campus.unimib.NOTit> wrote in message <firstname.lastname@example.org>... > "kinor" wrote in message <email@example.com>... > > > Hi Luca, > > i guess your mask(:,:,:,3) = (mask>4 &mask<7)*255; > > should be maskC(:,:,:,3) = (mask>4 &mask<7)*255; ? > > Yes, of course! > > > I'm going to try how faster your version is. > I would not expect reducing the number of scalar multiplications to provide great improvements. > You don't see either a way to use logical indexing, do you?