powered by
l2norm(u,v)
sqrt(sum((u-v)^2))
linfnorm
wstCV
wstCVl
# # 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
Run the code above in your browser using DataLab