	DOUBLE PRECISION FUNCTION FUNCTN (X, A, NMODEL)
C
C	Exponential model function for NLFIT.  One or two exponentials,
C	with or without background, are modeled as follows:
C
C	    NMODEL	MODEL
C
C	      2         A(1)*EXP(A(2)*X)
C	      3         A(1)*EXP(A(2)*X)+A(3)
C	      4         A(1)*EXP(A(2)*X)+A(3)*EXP(A(4)*X)
C	      5         A(1)*EXP(A(2)*X)+A(3)*EXP(A(4)*X)+A(5)
C
	DOUBLE PRECISION A(1), XX
C
	XX = X
	FUNCTN = A(1) * DEXP( A(2)*XX )
C
	GO TO (20,30,40,50), NMODEL-1
C
   20	RETURN
C
   30	FUNCTN = FUNCTN + A(3)
	RETURN
C
   40	FUNCTN = FUNCTN + A(3) * DEXP( A(4)*XX )
	RETURN
C
   50	FUNCTN = FUNCTN + A(5)
	GO TO 40
C
	END
