-
multiply matrix
Does anybody knows why a division by zero error appears when i try to multiply matrix?
this is the example:
Dim Matriz(1 To 10, 1 To 10)
Dim Matriz3(1 To 10, 1 To 10)
MS2.Redraw = False
For g = 1 To 10 '1rows
For i = 1 To 10 '1cols
Matriz3(i, g) = Format(x * Matriz2(g, 1) * Matriz1(1, i), "0.000000%")
MS2.TextMatrix(i, g) = Format(Val(Matriz(g, i)) / Val(Matriz3(i, g)), "0.0000%")
Next i
Next g
MS2.Redraw = True
where MS2 is a MSHFlexgrid object
Thanks
-
Re: multiply matrix
Presumably - Val(Matriz3(i, g)), "0.0000%") goes to zero at some point. Have you double checked your source data ?