*** Calculate the percentage of 5x5 binary matrices with det = 0 *** >> A = rand(5) A = 0.2644 0.0438 0.2038 0.5057 0.6141 0.2064 0.0061 0.2342 0.0610 0.3391 0.9322 0.8171 0.8985 0.1353 0.6857 0.3933 0.9152 0.7878 0.0222 0.2174 0.0624 0.7416 0.1830 0.8698 0.2314 >> A = round(rand(5)) A = 0 1 0 1 0 0 1 1 0 0 0 1 0 1 1 1 0 0 1 0 0 1 0 0 0 >> c = 0 c = 0 >> for j=1:1000 A = round(rand(5)); if (det(A)==0) c = c + 1; end end >> c c = 630 >> c = 0; >> for j=1:10000 A = round(rand(5)); if (det(A)==0) c = c + 1; end end >> c c = 6285