Obscure Matlab function #1: bsxfun

Here’s a first in what might become a regular feature on xcorr: an exposition of some of Matlab’s obscure but quite useful functions. Today’s function: bsxfun. The Matlab documentation states that bsxfun’s function is to: Apply element-by-element binary operation to two arrays with singleton expansion enabled This is not a very helpful definition. What bsxfun(@op,A,B) … More Obscure Matlab function #1: bsxfun