matlab utility for iterating over combinations of parameters