function E = EM3(n,c,i,k) % EM2 elementary matrix of type III. % % EM3(n,c,i,k) is an n-by-n matrix that muliplies the % i-th row of any n-by-m matrix A by the scalar c and % then adds the result to the k-th row of A (when mul- % tiplying A on the left). % % Matt Kawski 7-10-99 % http://math.la.asu.edu/~kawski % kawski@asu.edu % E = eye(n); if ( i > n ) disp('First index exceeds matrix dimension') elseif ( k > n ) disp('Second index exceeds matrix dimension') else E(k,i) = c; end