Skip to content

Instantly share code, notes, and snippets.

@Naouak
Created October 6, 2014 20:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Naouak/adf0e6b334d22a5e76e9 to your computer and use it in GitHub Desktop.
Save Naouak/adf0e6b334d22a5e76e9 to your computer and use it in GitHub Desktop.
Matrices Multiplication
function multiply(a,b){
return a.map(function(v,i){
v.map(function(w,j){
var sum = 0;
for(var k = 0; k < v.length; k++){
sum+=a[i][k]*b[k][j];
}
return sum;
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment