%ltwonorm %This returns the l_2 norm for a finite sequence of length 7. %the sequence is the only input. function y = ltwonorm(x1, x2, x3, x4, x5, x6, x7) X = [0 0 0 0 0 0 0]; X = [x1 x2 x3 x4 x5 x6 x7]; S = 0; for i = 1:7 S = S + X(i)^2 end y = sqrt(S);