Changeset 152 for trunk/SRC/Obsolete
- Timestamp:
- 08/10/06 09:01:35 (18 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Obsolete/congridseb.pro
r151 r152 4 4 ;+ 5 5 ; @file_comments 6 ; Like congrid but here, it works... 7 ; example: 6 ; 7 ; Used to avoid a bug in congrid in a old version of IDL 8 ; Useless now... 9 ; 10 ; old example: based on a old version of IDL (5.??) 8 11 ; IDL> print, congrid([[1,2,3,4],[5,6,7,8]],12,4) 9 12 ; 1 1 1 2 2 2 3 3 3 3 4 4 … … 22 25 ; 5 5 5 6 6 6 7 7 7 8 8 8 23 26 ; 24 ; @ categories utilities27 ; @obsolete 25 28 ; 26 ; @param tableau{in}{required}27 ; A table 1 ou 2d29 ; @param arr {in}{required} 30 ; 1 or 2d array 28 31 ; 29 32 ; @param x {in}{required} 30 ; dimension in xof the result which must be31 ; a multiple of the dimension in x of the table.33 ; first dimension of the result which must be 34 ; a multiple of the first dimension of the input array. 32 35 ; 33 36 ; @param y {in}{required} 34 ; dimension in yof the result which must be35 ; a multiple of the dimension in y of the table.37 ; second dimension of the result which must be 38 ; a multiple of the second dimension of the input array 36 39 ; 37 40 ; @returns 38 ; a table dim x *y41 ; an array which dimensions are x,y 39 42 ; 40 43 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) … … 52 55 compile_opt idl2, strictarrsubs 53 56 ; 54 res=tableau55 taille = size(tableau)56 57 CASE N_PARAMS() OF 57 2: begin 58 res=replicate(1,1.*x/taille[1])#res[*] 59 return, res[*] 60 end 61 3: begin 62 res = transpose(res) 63 res = replicate(1, 1.*y/taille[2])#res[*] 64 res = reform(res, y, taille[1], /over) 65 res = transpose(res) 66 res = replicate(1, 1.*x/taille[1])#res[*] 67 return, reform(res, x,y, /overwrite) 68 end 69 else: return, report('Mauvais nombre de parametre dans l''appel de CONGRIDSEB') 58 2: return, congrid(tableau, x) 59 3:return, congrid(tableau, x, y) 60 else: return, report('Bad number or arguments in the call of congridseb') 70 61 endcase 71 62 end
Note: See TracChangeset
for help on using the changeset viewer.