add matlab and fix histsize