输入如下命令即可得到五阶的Hilbert矩阵,以此类堆,若为k阶则将5换为相应数字即可。> n<-5;x<-array(0,dim=c(n,n))> for(i in 1:n){ + for(j in 1:n){ + x[i,j]<-1/(i+j-1)+ } + } > x 如图所示