Created
October 6, 2014 20:03
-
-
Save Naouak/adf0e6b334d22a5e76e9 to your computer and use it in GitHub Desktop.
Matrices Multiplication
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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