factors function

MATLAB factor function