Dim matrix_a(0 To 2, 0 To 2) As Double
Dim matrix_b(0 To 2, 0 To 2) As Double
Dim summe As Variant
matrix_a(0,0) = 56.23
matrix_a(0,1) = 7.87
matrix_a(0,2) = 65.12
matrix_a(1,0) = 876.23
matrix_a(1,1) = 3.42
matrix_a(1,2) = 87.55
matrix_a(2,0) = 9.96
matrix_a(2,1) = 5.64
matrix_a(2,2) = 0.74
matrix_b(0,0) = 23.83
matrix_b(0,1) = 7.22
matrix_b(0,2) = 823
matrix_b(1,0) = 11.72
matrix_b(1,1) = 8.528
matrix_b(1,2) = 1
matrix_b(2,0) = 0
matrix_b(2,1) = 13.44
matrix_b(2,2) = 772.32
summe = CNCL_MatrixAdd(matrix_a, matrix_b)
Print summe(0,0), summe(0,1), summe(0,2)
Print summe(1,0), summe(1,1), summe(1,2)
Print summe(2,0), summe(2,1), summe(2,2)
Ausgabe:
80.06 15.09 888.12
887.95 11.948 88.55
9.96 19.08 773.06