Results 1 to 2 of 2

Thread: multiply matrix

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    9

    Question 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

  2. #2
    Frenzied Member David.Poundall's Avatar
    Join Date
    Sep 2002
    Location
    Robin Hood Land
    Posts
    1,457

    Re: multiply matrix

    Presumably - Val(Matriz3(i, g)), "0.0000%") goes to zero at some point. Have you double checked your source data ?
    David

    Learn the Rules so that you know how to break them properly.

    Printing dll dBTools MZTools Winsock API WinsockVB More Winsock SGrid2 MSChart Mail2Web

    If you have found this thread useful then read this

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width