l2norm              package:wavethresh              R Documentation

_C_o_m_p_u_t_e _L_2 _d_i_s_t_a_n_c_e _b_e_t_w_e_e_n _t_w_o _v_e_c_t_o_r_s _o_f _n_u_m_b_e_r_s.

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

     Compute L2 distance between two vectors of numbers (square root of
     sum of squares of differences between two vectors).

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

     l2norm(u,v)

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

       u: first vector of numbers

       v: second vector of numbers

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

     Function simply computes the L2 distance between two vectors and
     is implemented as 

     'sqrt(sum((u-v)^2))'

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

     A real number which is the L2 distance between two vectors.

_R_E_L_E_A_S_E:

     Version 3.6 Copyright Guy Nason 1995

_S_e_e _A_l_s_o:

     'linfnorm', 'wstCV', 'wstCVl'.

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

     #
     # What is the L2 norm between the following sets of vectors
     #
     #p <- c(1,2,3,4,5)
     #q <- c(1,2,3,4,5)
     #r <- c(2,3,4,5,6)
     #l2norm(p,q)
     # [1] 0
     #l2norm(q,r)
     # [1] 2.236068
     #l2norm(r,p)
     # [1] 2.236068

