Example

 

Taking the COLMEAN of the following matrix:

 

a = {{1, 4, 7},
     {2, 5, 8},
     {3, 6, 9}};

 

b = colmean(a);

 

produces a row, or vector, of the following values:

 

b == {{2, 5, 8}}

 

Taking the TRANSPOSE of the above row vector produces a column vector. You can use this vector to perform vector calculations.

 

transpose(b) ==  {2,
                  5
                  8}

 

See the section entitled "Statistical Analysis" later on in this chapter for further examples of functions that produce a vector from a matrix.