idl programming language - Scrambling an array in idl -
i wondering if there module in idl 1 can utilize scramble array of floating point numbers. tried using scramble.pro problem returns integers, , if seek utilize float doesn't homecoming exact numbers entered, example:
array = [2.3, 4.5, 5.7,8.9] scr_array = scramble(array) print, scr_array output: 4 2 8 5
and if utilize float:
print, float(scr_array)
the output is:
4.0000 2.0000 8.0000 5.0000
any ideas?
try using this sampling routine, asking elements:
idl> array = [2.3, 4.5, 5.7,8.9] idl> scramble_indices = mg_sample(4, 4) idl> print, scramble_indices 1 3 0 2 idl> print, array[scramble_indices] 4.50000 8.90000 2.30000 5.70000
idl-programming-language scramble
No comments:
Post a Comment