Facebook
From Archisman Panigrahi, 4 Years ago, written in Matlab M-file.
Embed
Download Paste or View Raw
Hits: 286
  1. for a = 1:500
  2.         for b = 1:500
  3.                 c(a,b) = sin(a + b^2);
  4.         endfor
  5. endfor
  6.  
  7. g = eig(c);
  8. max(real(g))
  9.  
  10.  
  11. %Correct result is ans =  16.915
  12. %With MKL in Ubuntu 20.04, I get random numbers of order 10^5 - 10^6, which changes every time