      SUBROUTINE CVBR(B,KB,M,N,ML,MU,A,KA)
C     ******************************************************************
C     CONVERSION OF REAL MATRICES FROM BANDED TO STANDARD FORM
C     ******************************************************************
      REAL A(KA,N),B(KB,1)
C
C     STORE THE NONZERO DATA OF THE FIRST ML ROWS
C
      IF (ML .EQ. 0) GO TO 20
      DO 11 I = 1,ML
      JMAX = MIN0(N,I+MU)
        DO 10 J = 1,JMAX
        K = J - I + ML + 1
   10   A(I,J) = B(I,K)
   11 CONTINUE
C
C     STORE THE REMAINING NONZERO DATA
C
   20 IMIN = ML + 1
      IMAX = MIN0(M,ML+N)
      DO 22 I = IMIN,IMAX
      JMIN = I - ML
      JMAX = MIN0(N,I+MU)
      J = JMAX
        DO 21 JJ = JMIN,JMAX
        K = J - I + ML + 1
        A(I,J) = B(I,K)
   21   J = J - 1
   22 CONTINUE
C
C     INSERT ZEROS IN THE UPPER RIGHT CORNER
C
      JMIN = MU + 2
      IF (JMIN .GT. N) GO TO 40
      IMAX0 = 1
      DO 31 J = JMIN,N
        DO 30 I = 1,IMAX0
   30   A(I,J) = 0.0
   31 IMAX0 = MIN0(IMAX,IMAX0+1)
C
C     INSERT ZEROS IN THE LOWER LEFT CORNER
C
   40 IF (IMIN .EQ. IMAX) GO TO 50
      JMAX = IMAX - IMIN
      DO 42 J = 1,JMAX
      IMIN = IMIN + 1
        DO 41 I = IMIN,IMAX
   41   A(I,J) = 0.0
   42 CONTINUE
C
C     STORE ZEROS IN THE FINAL M-IMAX ROWS
C
   50 IF (IMAX .EQ. M) RETURN
      IMIN = IMAX + 1
      DO 52 J = 1,N
        DO 51 I = IMIN,M
   51   A(I,J) = 0.0
   52 CONTINUE
      RETURN
      END
