function H = functionloops(n) % FUNCTIONLOOPS sets up a random matrix of size nxn, % using double-nested loops. H = zeros(n,n); for j = 1:n for i = 1:n H(i,j) = rand(1,1); end end return;