28 lines
437 B
Fortran
28 lines
437 B
Fortran
|
|
SUBROUTINE wextend(n,x,lf,y)
|
|
implicit none
|
|
|
|
integer :: n,lf
|
|
real*8 :: x(n),y(n+2*lf)
|
|
|
|
integer :: i
|
|
|
|
y = 0
|
|
|
|
if(n>lf) then
|
|
do i=1,lf
|
|
y(i) = x(lf-i+1)
|
|
end do
|
|
do i=lf+1,lf+n
|
|
y(i) = x(i-lf)
|
|
end do
|
|
do i=lf+n+1,n+2*lf
|
|
y(i) = x(lf+2*n+1-i)
|
|
end do
|
|
else
|
|
goto 10
|
|
end if
|
|
|
|
10 end subroutine
|
|
|
|
|