SUB_WAVELET/Fortran/SUB_wthresh.f90
2025-04-17 17:31:56 +08:00

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