/[PAMELA software]/gpamela/gptrd/xtrinter.F
ViewVC logotype

Contents of /gpamela/gptrd/xtrinter.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.1.1.1 - (show annotations) (download) (vendor branch)
Thu Jul 11 16:02:01 2002 UTC (22 years, 5 months ago) by cafagna
Branch: v3r0, MAIN
CVS Tags: v4r4, v4r5, v4r6, v4r7, v4r0, v4r1, v4r2, v4r3, v4r8, v4r9, firstrelease, v4r14, v4r12, v4r13, v4r10, v4r11, v3r3, v3r1, v3r2, HEAD
Changes since 3.1: +0 -0 lines
First GPAMELA release on CVS

1 *
2 * $Id$
3 *
4 * $Log$
5 *
6 *CMZ : 3.00/00 09/04/2001 15.38.41 by Marialuigia Ambriola
7 *-- Author : Marialuigia Ambriola 05/04/2001
8 REAL FUNCTION XTRINTER(S,Y,X,N)
9 ****************************************
10 * makes a linear interpolation
11 * called by GPUSTEP
12 ****************************************
13 REAL X(N),Y(N),S,XX
14 INTEGER N
15 XTRINTER=0.
16 XX=0.
17 c PRINT*,'N,S',N,S
18 c PRINT*,'Y=',Y
19 DO I=2,N
20 IF(S.EQ.Y(I-1)) THEN
21 XX=X(I-1)
22 GOTO 100
23 ENDIF
24 IF(S.LT.Y(I).AND.S.GT.Y(I-1)) THEN
25 XX=X(I-1)+(X(I)-X(I-1))*(S-Y(I-1))/(Y(I)-Y(I-1))
26 GOTO 100
27 ENDIF
28 ENDDO
29 100 XTRINTER=XX
30 c PRINT*,'EXTRACTED ENERGY',XX
31 RETURN
32 END

  ViewVC Help
Powered by ViewVC 1.1.23