2012-01-04 function R inprd=function(x,y){ return(t(x)%*%y)#x,y must be col vectors. } inprd(x,y) norm=function(x){ return(sqrt(t(x)%*%x)) } norm(x)