The flatten takes a list as argument.
flatten returns a list which is the result of recursively
replacing any elements that are lists by the elements, resulting in a
list with no lists as elements.
Input:
Output:
If the original list is a matrix, you can use the mat2list command for this (see section 5.43.45).