linc.pro

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

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

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

	return, result
end

⌨️ 快捷键说明

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