|||
即求众数;
利用histogram函数可以实现;示例如下:
IDL> a = [1,2,3,4,5,6,7,2,3,2]
IDL> his = histogram(a)
IDL> idx = where(his eq max(his))
IDL> print,a[idx[0]]
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-11-22 07:44
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社