Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Thank you! And a related question -- when I set restr = vars.Table[1,n*n] <= 1...I get that NMinimize fails to converge. Also, how do I add the constraint that every element of PP is nonnegative?