- Timestamp:
- 08/08/08 16:11:31 (16 years ago)
- Location:
- trunk/SRC/Matrix
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Matrix/different.pro
r372 r373 2 2 ; 3 3 ; @file_comments 4 ; calculate the different elements of 2 matrix of positive whole numbers. 4 ; find the different elements of 2 matrixes of positive whole numbers. 5 ; 6 ; see also <pro>union</pro> and <pro>inter</pro>. 5 7 ; 6 8 ; @categories … … 16 18 ; 17 19 ; @returns 18 ; tableau20 ; an array containing the set of values in only a. 19 21 ; 20 ; @restrictions21 22 ; The empty set is denoted by an array with the first element equal to 22 23 ; -1. … … 32 33 ; IDL> a = [2,4,6,8] 33 34 ; IDL> b = [6,1,3,2] 34 ; IDL> different(a,b) = [ 4, 8] ; Elements in A but not in B 35 ; 36 ; IDL> res=different(a,b) 37 ; 4 8 38 ; Right because 4 and 8 are in a but not in b ! 39 ; 40 ; IDL> res=different(b,a) 41 ; IDL> print,res 42 ; 1 3 43 ; 44 ; Right because 1 and 3 are in b but not in a ! 35 45 ; 36 46 ; @history -
trunk/SRC/Matrix/extrac2.pro
r372 r373 33 33 ; 34 34 ; @param array {in}{required} 35 ; a 1 ,2,3 or 4 diminput array35 ; a 1d, 2d, 3d or 4d input array 36 36 ; 37 37 ; @param index1 {in}{required} … … 57 57 ; 58 58 ; @examples 59 ; I have a dim 2matrix named A. I want extract a small intersection59 ; I have a 2d matrix named A. I want extract a small intersection 60 60 ; matrix 2d of the line 2, 3 and 7 and of the column 0 and 1: 61 61 ; -
trunk/SRC/Matrix/inter.pro
r371 r373 2 2 ; 3 3 ; @file_comments 4 ; calculate the intersection between 2 matrices of whole numbers 4 ; find the intersection between 2 matrices of whole numbers 5 ; 6 ; see also <pro>difference</pro> and <pro>union</pro> 5 7 ; 6 8 ; @categories … … 16 18 ; 17 19 ; @returns 18 ; tableau20 ; an array containing the set of values in both a and b. 19 21 ; 20 ; @restrictions21 22 ; The empty set is denoted by an array with the first element equal to 22 23 ; -1. … … 33 34 ; IDL> a = [2,4,6,8] 34 35 ; IDL> b = [6,1,3,2] 35 ; IDL> inter(a,b) = [ 2, 6] ; Common elements 36 ; IDL> res=inter(a,b) 37 ; 2 6 38 ; Right because 2 and 6 are in a and B. 36 39 ; 37 40 ; @history -
trunk/SRC/Matrix/union.pro
r372 r373 2 2 ; 3 3 ; @file_comments 4 ; calculatethe union between 2 matrices of whole numbers4 ; find the union between 2 matrices of whole numbers 5 5 ; 6 ; see also <pro>difference</pro> and <pro>inter</pro>. 7 6 8 ; @categories 7 9 ; Calculation … … 16 18 ; 17 19 ; @returns 18 ; tableau 19 ; 20 ; @restrictions 21 ; The empty set is denoted by an array with the first element equal to -1. 20 ; an array containing the set of values in a and b. 22 21 ; 23 22 ; @restrictions … … 32 31 ; IDL> a = [2,4,6,8] 33 32 ; IDL> b = [6,1,3,2] 34 ; IDL> union(a,b) = [ 1, 2, 3, 4, 6, 8] ; Elements in either set 33 ; IDL> res=union(a,b) 34 ; IDL> print, res 35 ; 1 2 3 4 5 6 36 8 37 ; this is the list ao all elements in either sets. 35 38 ; 36 39 ; @history -
trunk/SRC/Matrix/zero_one.pro
r325 r373 6 6 ; Matrix 7 7 ; 8 ; @param n1 {in}{required} 8 ; @param n1 {in}{required} {type=integer} 9 9 ; number of elements in the first dimension 10 10 ; 11 ; @param n2 {in} {required}11 ; @param n2 {in} {type=integer} 12 12 ; number of elements in the second dimension 13 13 ; 14 ; @examples 15 ; 16 ; IDL> a=zero_one(3) 17 ; IDL> help,a 18 ; A FLOAT = Array[3] 19 ; IDL> print,a 20 ; 0.00000 1.00000 0.00000 21 ; 22 ; IDL> a=zero_one(2,3) 23 ; IDL> help,a 24 ; A FLOAT = Array[2, 3] 25 ; IDL> print,a 26 ; 0.00000 1.00000 27 ; 1.00000 0.00000 28 ; 0.00000 1.00000 29 ; 14 30 ; @returns 15 ; result31 ; an array of n1 dimension or n1xn2 dimensions 16 32 ; 17 33 ; @history
Note: See TracChangeset
for help on using the changeset viewer.