normalize              package:cwhmath              R Documentation

_N_o_r_m_a_l_i_z_e _v_e_c_t_o_r_s

_D_e_s_c_r_i_p_t_i_o_n:

     Normalize the columns of a matrix.

_U_s_a_g_e:

       normalize(x)

_A_r_g_u_m_e_n_t_s:

       x: the matrix containing the vectors to be normalized as
          _columns_.

_V_a_l_u_e:

     The matrix containing the normalized vectors as _columns_. If you
     want to normalize the _rows_ of a matrix, use 
     't(normalize(t(x)))'

_A_u_t_h_o_r(_s):

     Christian W. Hoffmann, christian.hoffmann@wsl.ch, 
      <URL: http://www.wsl.ch/staff/christian.hoffmann>

_E_x_a_m_p_l_e_s:

       x <- matrix(rnorm(30),nrow=6)
       normalize(x)
       t(normalize(t(x)))  # normalize the *rows* of x

