It is the same thing that happens to when you multiply 3D-arrays by 2D-arrays using '*' - if the dimensions match IDL rules for the first "slice" of the 3D array, then it performs the multiplication on the first slice and returns just the result of the operation on that one slice. Observe:
IDL> a = findgen(4,3,2)
IDL> print, a[*,*,0]
; 0.000000 1.00000 2.00000 3.00000
; 4.00000 5.00000 6.00000 7.00000
; 8.00000 9.00000 10.0000 11.0000
IDL> b = a * (fltarr(4,3) + 10)
IDL> help, b
B FLOAT = Array[4, 3]
IDL> print, b
; 0.000000 10.0000 20.0000 30.0000
; 40.0000 50.0000 60.0000 70.0000
; 80.0000 90.0000 100.000 110.000
IDL> myMatrixMultiplier = fltarr(3) + 10
IDL> c = a # myMatrixMultiplier
IDL> print, c
; 120.000 150.000 180.000 210.000
IDL> print, a[*,*,0] # myMatrixMultiplier
; 120.000 150.000 180.000 210.000
There is no real matrix math operator for 3D arrays; matrices are, by definition, 1D or 2D only.
James Jones
|