clear all Hsize=7 for i=1:Hsize for j=1:Hsize hilb(i,j)=1/(i+j-1); end end disp(hilb)