SUB_WAVELET/Fortran/SUB_ebayesthresh.f90

38 lines
644 B
Fortran
Raw Normal View History

2025-04-17 11:06:03 +08:00
SUBROUTINE ebayesthresh(m,x,stdest,muhat)
implicit none
integer :: m
real*8 :: x(m),stdest,muhat(m)
real*8 :: minstd,temp_stdest(m),tempx(m),weight,pi
integer :: maxiter
maxiter = 50
minstd = 1.0e-9
pi = 3.1415926
if(stdest<minstd) then
temp_stdest = minstd
else
temp_stdest = stdest
end if
tempx = x/temp_stdest
call weightfromdata(m,tempx,30,weight)
call postmedcauchy(m,tempx,weight,maxiter,muhat)
muhat = muhat*temp_stdest
end subroutine