17 lines
296 B
Fortran
17 lines
296 B
Fortran
|
|
SUBROUTINE wthresh(n,x,t,y)
|
|
implicit none
|
|
|
|
integer :: n
|
|
real*8 :: x(n),t,y(n)
|
|
|
|
real*8 :: temp(n),FUNC_sign
|
|
integer :: i
|
|
|
|
temp = abs(x)-t
|
|
temp = (temp+abs(temp))/2.0
|
|
do i=1,n
|
|
y(i) = FUNC_sign(x(i))*temp(i)
|
|
end do
|
|
|
|
end subroutine |