摘要: IDL> array=[[11,22,33],[44,55,66],[77,88,99],[33,33,33]] IDL> print, array 11 22 33 44 55 66 77 88 99 33 33 33 IDL> index = where(array eq 33) IDL> re 阅读全文
posted @ 2020-09-07 14:20 lqqgis 阅读(1112) 评论(0) 推荐(0) 编辑
摘要: year_arr = ['1998','1998','1999','2000','1999','1998','2001'] uniq_year_arr =year_arr[UNIQ(year_arr, SORT(year_arr))] print, uniq_year_arr 运行结果为: 1998 阅读全文
posted @ 2020-09-07 14:19 lqqgis 阅读(233) 评论(0) 推荐(0) 编辑
摘要: IDL> a=[[1,2],[3,4]] IDL> b=[[4,5],[6,7]] IDL> print,a 1 2 3 4 IDL> print,b 4 5 6 7 IDL> c1=[[a],[b]] IDL> print,c1 1 2 3 4 4 5 6 7 IDL> c2=[[[a]],[[b 阅读全文
posted @ 2020-09-07 14:18 lqqgis 阅读(660) 评论(0) 推荐(0) 编辑
摘要: IDL> str = strarr(3,2) IDL> str += 'new string' IDL> print,str new string new string new string new string new string new string 阅读全文
posted @ 2020-09-07 14:17 lqqgis 阅读(374) 评论(0) 推荐(0) 编辑
摘要: ;+ ; :Description: ; Double Sort ; :Input: ; input array dimensions: 2*N ; idx: 0 - Sort by the first column firstly (Default) ; 1 - Sort by the secon 阅读全文
posted @ 2020-09-07 14:14 lqqgis 阅读(249) 评论(0) 推荐(0) 编辑
摘要: IDL> array = [1.0,2.9,3.8,4.7,5.6,6.5,7.4,8.3,9.2,10.1] ; 10个数的数组 IDL> selectCount = round( n_elements(array) * 0.8) ; 选择数组个数的80%的数量 IDL> print, selec 阅读全文
posted @ 2020-09-07 14:12 lqqgis 阅读(731) 评论(0) 推荐(0) 编辑
摘要: IDL> print, string(format='(f)', 100) 100.0000000000000000 IDL> print, string(format='(f)', 100.0) 100.0000000 IDL> print, string(format='(f)', 100.12 阅读全文
posted @ 2020-09-07 14:11 lqqgis 阅读(741) 评论(0) 推荐(0) 编辑
摘要: pro test compile_opt idl2 a = 100.000000002 b = 100.000000000 help, a help, b if a gt b then $ print, '100.000000002 gt 100.000000000' if a eq b then 阅读全文
posted @ 2020-09-07 14:08 lqqgis 阅读(642) 评论(0) 推荐(0) 编辑
摘要: IDL安装主目录 IDL> !DIR C:\Program Files\Exelis\IDL85 IDL搜索库文件及路径,包含IDL自带库文件路径和用户工作空间路径。 IDL> !PATH C:\Program Files\Exelis\IDL85\lib\bridges;C:\Program Fi 阅读全文
posted @ 2020-09-07 14:07 lqqgis 阅读(1724) 评论(0) 推荐(0) 编辑
摘要: pro test_keyword, a, key1 =key1 if keyword_set(key1) then $ print, a+key1 $ else $ print, a end IDL> test_keyword, 4, key1=6 10 IDL> test_keyword, 4 4 阅读全文
posted @ 2020-09-07 14:02 lqqgis 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 1 字符串拼接 IDL> arr=['My name', 'is', 'QQ'] IDL> print, strjoin(arr) ;直接拼接字符串 My nameisQQ IDL> print, strjoin(arr,'\t') ;用'\'对字符串进行拼接 My name\tis\tQQ IDL 阅读全文
posted @ 2020-09-07 13:59 lqqgis 阅读(1297) 评论(0) 推荐(0) 编辑
摘要: 修改当前工作空间 IDL> CD, 'D:\home\data\';指定一个完整的路径 IDL> CD, './january';改变为当前路径的子路径 IDL> CD, '..'; 回到上一级路径 阅读全文
posted @ 2020-09-07 13:52 lqqgis 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 对风云3(FY3)条带亮度温度数据进行几何校正,结果发现相同代码下,ENVI5.1+IDL8.3与 ENVI5.3+IDL8.5运行结果明显不同 代码如下: pro fy3d_geo in_path ='D:\_User\test_he5\' out_path_rad = 'D:\_User\tes 阅读全文
posted @ 2020-09-07 13:49 lqqgis 阅读(700) 评论(0) 推荐(0) 编辑
摘要: 通过IDL多线程,进行两个数相加为例 1. 相加函数如下 function add, a, b return, a+b end 2. 主线程函数如下,通过新建分线程调用相加函数,如果线程运行结束,则输出结果 pro thread_test compile_opt idl2 this_pro_path 阅读全文
posted @ 2020-09-07 13:47 lqqgis 阅读(759) 评论(0) 推荐(1) 编辑
摘要: IDL> str = 'thick_awi_20120304_v2' ; str可以是数组 IDL> print, STREGEX('thick_awi_20120304_v2', '_([0-9]{8})_', /SUBEXPR,/extract) _20120304_ 20120304 执行下面 阅读全文
posted @ 2020-09-07 13:45 lqqgis 阅读(330) 评论(0) 推荐(0) 编辑
摘要: IDL 程序分两类:过程 pro 和函数 Function, 最大区别是函数有返回值 pro add,a,b print,a+b end function add,a, b return,a+b end 1 .compile .run .rnew 编辑 IDL 编译程序有.compile .run 阅读全文
posted @ 2020-09-07 13:42 lqqgis 阅读(1546) 评论(0) 推荐(0) 编辑