fixed generate_paths for MATLAB2010a