Watch this Author's files
i cannot do anything but give a five star! absolutely smarter than mathworks!
i think matlab should take this code into itself as a build-in function
but i have a question
is the time complexity of your algorithm on the order of n^3 or n^4?