Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

Matrix Operators


Operator
Description
Example
#
Computes array elements by multiplying the columns of the first array by the rows of the second array.

;A 3-column by 2-row array:

array1 = [ [1, 2, 1], [2, -1, 2] ]

;A 2-column by 3-row array:

array2 = [ [1, 3], [0, 1], [1, 1] ]

PRINT, array1#array2

 

IDL prints:

7 -1 7

2 -1 2

3 1 3

##
Computes array elements by multiplying the rows of the first array by the columns of the second array.

;A 3-column by 2-row array:

array1 = [ [1, 2, 1], [2, -1, 2] ]

;A 2-column by 3-row array:

array2 = [ [1, 3], [0, 1], [1, 1] ]

PRINT, array1##array2

  
IDL prints:

2 6

4 7


Home | Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]