Jeremy Knight 3/31/11
<Text-field style="Heading 1" layout="Heading 1">L2Norm(n,x::Array)</Text-field> L2Norm:=proc(n,x::Array) #calculates the l2 norm of vector x local i,temp: temp:=0: for i from 1 to n do temp:=temp+x[i]^2: end do: return(sqrt(temp)): end proc: x:=Array([5,12]); L2Norm(2,x); LV9JLFR5cGVzZXR0aW5nRzYkJSpwcm90ZWN0ZWRHSShfc3lzbGliRzYiSSxtcHJpbnRzbGFzaEdGKDYkNyM+SSJ4R0YoLUknUlRBQkxFR0YoNiUiKicqSGJuIi1JJ1ZFQ1RPUkdGKDYjNyQiIiYiIzdJJkFycmF5R0YmNyMtRjg2Iy9JJCVpZEdGKEYx IiM4
JSFH