Segregation of granular materials in rotating cylinders