Previous Up Next

6.3.32  Creating a matrix from a list

The listmat command turns a list into a matrix by chopping up the list into separate rows.

Examples

list2mat([5,8,1,9,5,6],2)
     
⎡
⎢
⎢
⎣
58
19
56
⎤
⎥
⎥
⎦
          
list2mat([5,8,1,9],3)
     
⎡
⎢
⎣
581
900
⎤
⎥
⎦
          

Previous Up Next