I chose the method to use, based upon the very nice capabilities the Matrix operators have in JSL. The statement
mat = Sqrt( Sum( mat ^ 4 ) );
is an illustration of how nice and concise the calculations can be made using matrices.
But to use matrix operators, the data must be in a matrix. So for each row, the matrix Mat is first set to being an empty matrix
mat = [];
and then the For() loop takes each of the columns specified in the << Get Selected Columns and adds the value for that column for the given row, to the matrix "Mat" as a new element in the matrix. It is "Concatenating" the value of the column for the current row to the matrix.
mat = mat || Column( cols[i] )[Row()]
Jim