Matlab script forest