function C = sum2(A,B) n = length(A); C = zeros(1,n); % kun optimalisering, kan droppes for i = 1:n C(i) = A(i) + B(i); end end