Highly vectorized and other numerical MATLAB functions