Satimage Previous | Next
Interleaving arrays of real
Home Documentation Smile Computing Smile's maths Interleaving arrays of real  
The as matrix coercion applied to a list of arrays of real returns the matrix where the elements of the list are the columns.

The array of real of the matrix stores the first row first. Thus, to interleave several arrays of real into one, use the following construct.
set a to array of real of ({a1, a2, a3} as matrix)
set a1 to {1, 11, 111} as array of real
set a2 to {2, 22, 222} as array of real
set a3 to {3, 33, 333} as array of real
set a to array of real of ({a1, a2, a3} as matrix)
a as list of real
  --  {1.0, 2.0, 3.0, 11.0, etc.}
Version française
Copyright ©2008 Paris, Satimage