tab_sort.pro

来自「basic median filter simulation」· PRO 代码 · 共 31 行

PRO
31
字号
pro tab_sort,column,tcb,tab;+; NAME:;	TAB_SORT; PURPOSE:;	Procedure to sort table by the specified column;; CALLING SEQUENCE:;	tab_sort, column, tcb, tab;; INPUTS:;	column - column name or number to sort on;	tcb - table control block;; INPUT/OUTPUTS:;	tab - table array;; HISTORY:;	version 1  D. Lindler  April 1989;	Converted to IDL V5.0   W. Landsman   September 1997;-;-----------------------------------------------------------------------	values=tab_val(tcb,tab,column)	;extract column	index=sort(values)		;sort column	nrows=n_elements(index)		;number of rows	newtab=tab	for i=0,nrows-1 do newtab[0,i]=tab[*,index[i]]	;sort table	tab=newtab	return	end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?