Matrix multiplication: Difference between revisions
m
→{{header|PowerShell}}
Line 3,569:
$n,$m,$p = ($a.Count - 1), ($b.Count - 1), ($b[0].Count - 1)
if ($a[0].Count -ne $b.Count) {throw "Multiplication impossible"}
$c = @(0)*($
foreach ($i in 0..$n) {
$c[$i] = foreach ($j in 0..$p) {
|