cosangle                 package:dr                 R Documentation

_C_o_m_p_u_t_e _t_h_e _c_o_s_i_n_e _o_f _t_h_e _a_n_g_l_e _b_e_t_w_e_e_n _a _v_e_c_t_o_r _a_n_d _a _s_u_b_s_p_a_c_e

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

     `cosangle1' returns the cosine of the angle between a vector vecs 
     and the subspace spanned by the columns of the matrix mat.  For
     cosangle, vecs can be a matrix, in which case cosangle1 is called
     for each column in vecs.

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

     cosangle(mat, vecs)
     cosangle1(mat, vec)

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

     mat: A matrix the provides the basis for a subspace

    vecs: A vector with the same number of rows as mat, or a matrix
          with the same number of rows as mat

     vec: A vector with the same number of rows as mat

_D_e_t_a_i_l_s:

     `cosangle1' computes the cosine of the angle between vec and the
     orthogonal projection of vec onto the column space of mat. 
     `cosangle' repeats this computation for each column of vecs.

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

     cosangle1 returns a single value and cosangle returns a vector.

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

     Sanford Weisberg <sandy@stat.umn.edu>

