// KPF.js 6/23/16 aev // HFJS: Plot any matrix mat (filled with 0,1) function pmat01(mat, color) { // DCLs var cvs = document.getElementById('canvId'); var ctx = cvs.getContext("2d"); var w = cvs.width; var h = cvs.height; var m = mat[0].length; var n = mat.length; // Cleaning canvas and setting plotting color ctx.fillStyle="white"; ctx.fillRect(0,0,w,h); ctx.fillStyle=color; // MAIN LOOP for(var i=0; i'+title+':
');
  for(var i=0; i'); re='';
  }//fend i
  document.write('
'); } // mkp function (exotic arrow function): Return the Kronecker product // of the a and b matrices mkp=(a,b)=>a.map(a=>b.map(b=>a.map(y=>b.map(x=>r.push(y*x)),t.push(r=[]))),t=[])&&t;