Previous Up Next

6.3.13  Flattening a list

The flatten command replaces any sublists of a list by their elements.

Example

flatten([[1,[2,3],4],[5,6]])
     

1,2,3,4,5,6
          
Remark.

If the original list is a matrix, you can also use the mat2list command for this (see Section 6.3.33).


Previous Up Next