Efficient Image Operations Using MATLAB
lesson
Images contain many pixels and the normal way to process them is with nested for loops that index each pixel in turn. This is slow and somewhat cumbersome to write. MATLAB has a facility called vectorization that allows us to perform complex matrix operations without any loops.