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

