Cutesy 3 line solution using built in MATLAB functions