In my program subroutine stlstp
passing work(2,1)
as parameter to stlfts(...)
subroutine. work(2,1)
will be double value at that index, but how subroutine converting it as single dimension array x(n)
?
When I print x
value in stlfts(...)
subroutine, it is printing elements of n
size, example:
STLFTS....X,,, 0.0000000000000000 1.4964418382246345E-317 1.48978578
58438612E-317 1.4964339331743010E-317 1.4964418382246345E-317 4.3367611401 ....
My understanding is, except 1st value, all other values in this x
are garbage, but not sure how this assignment will will effect original reference? can someone please help me with this?
subroutine stlstp(y,n,np,ns,nt,nl,isdeg,itdeg,ildeg,nsjump,ntjump,nljump,ni,userw,rw,season,trend,work)
! implicit none
! Arg
integer n,np,ns,nt,nl,isdeg,itdeg,ildeg,nsjump,ntjump,nljump,ni
logical userw
double precision y(n),rw(n),season(n),trend(n),work(20,5)
! Var
integer i,j
do 80 j = 1,1
do 1 i = 1,n
work(i,1) = y(i)-trend(i)
1 continue
call stlss(y,n,np,ns,isdeg,nsjump,userw,rw,season)
PRINT *, 'WORK 1,2 ....',work(1,2)
PRINT *, 'WORK ....',work
call stlfts(work(1,2),n+2*np,np,work(1,3),work(1,1))
Now stlfts
subroutine code is:
subroutine stlfts(x,n,np,trend,work)
integer n, np
double precision x(n), trend(n), work(n)
PRINT *, 'STLFTS....X,,,',x
call stlma(x, n, np, trend)
end
See Question&Answers more detail:
os