sinc_aolib.pro

来自「IDL语言编写的用于天文自适应光学仿真的软件CAOS V6.0的第一部分。」· PRO 代码 · 共 26 行

PRO
26
字号
; $Id: sinc.pro,v 1.2 2002/03/14 11:49:14 riccardi Exp $

function sinc, x
;+
;
; sinc(x) = 1 if x eq 0
;         = sin(2*!PI*x)/(2*!PI*x) otherwise
;
; it's the Fourier transform of Pup(x)= 1 if x le 1
;                                       0 otherwise
;
;-
	temp = where(x eq 0)
	
	if (temp(0) eq -1) then result = sin(2*!PI*x)/(2*!PI*x) $
	else begin
		result = x
		result(temp) = 1
		temp = where(x)
		result(temp) = sin(2*!PI*x(temp))/(2*!PI*x(temp))
	endelse

	return, result
end

⌨️ 快捷键说明

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