dennygibson
02-28-2019, 10:01 AM
The following bit of code is causing a problem ... as you can see a_b is a 2x2 matrix but b_b and c_b are vectors. I'm getting a compile error saying that b_b is a type mismatch.
This is an area that drives me crazy ... can anyone explain what's going on? This sort of thing costs me way more time to get straight than any coding difficulties I've ever encountered!
Dim a_b(1 To 2, 1 To 2) As Variant
Dim b_b As Variant
Dim c_b As Variant
a_b(1, 1) = 1# / 4#
a_b(1, 2) = 1# / 4# - Sqr(3#) / 6#
a_b(2, 1) = 1# / 4# + Sqr(3#) / 6#
a_b(2, 2) = 1# / 4#
b_b(1) = 1# / 2#
b_b(2) = 1# / 2#
c_b(1) = 1# / 2# - Sqr(3#) / 6#
c_b(2) = 1# / 2# + Sqr(3#) / 6#
This is an area that drives me crazy ... can anyone explain what's going on? This sort of thing costs me way more time to get straight than any coding difficulties I've ever encountered!
Dim a_b(1 To 2, 1 To 2) As Variant
Dim b_b As Variant
Dim c_b As Variant
a_b(1, 1) = 1# / 4#
a_b(1, 2) = 1# / 4# - Sqr(3#) / 6#
a_b(2, 1) = 1# / 4# + Sqr(3#) / 6#
a_b(2, 2) = 1# / 4#
b_b(1) = 1# / 2#
b_b(2) = 1# / 2#
c_b(1) = 1# / 2# - Sqr(3#) / 6#
c_b(2) = 1# / 2# + Sqr(3#) / 6#