%Build a 5 x 5 square matrix for i=1:5 for j=1:5 A(i,j) = i -j; %the semicolon keeps the results from being displayed end end %Build a 5 x 5 lower triangular matrix B = zeros(5,5); for i=1:5 for j=1:i B(i,j) = i + j; end end %Build a vector b = zeros(5,1); for i = 1:5 b(i) = i+2; end %Display results A B b