Factorization of an integer
问题 While answering another, I stumbled over the question how I actually could find all factors of an integer number without the Symbolic Math Toolbox . For example: factor(60) returns: 2 2 3 5 unique(factor(60)) would therefore return all prime-factors, "1" missing. 2 3 5 And I'm looking for a function which would return all factors ( 1 and the number itself are not important, but they would be nice) Intended output for x = 60 : 1 2 3 4 5 6 10 12 15 20 30 60 I came up with that rather bulky