#pragma -xO
      program mltest
      implicit real*8 (a-h, o-z)
      parameter (n = 20, m = 40)
      dimension a(n, m), conval(n), w(m)
      call pi8(pi)
      do j = 1, n
        do k = 1, m
          x = pi * (k - 0.5d0) / m - pi / 2.0
          signal = nint(j / 2.0d0) * cos(x)
          call rand48(s1, s2, rnd)
          dnoise = (2 * rnd - 1) / 10
          a(j, k) = signal + dnoise
        end do
      end do
      call mlwmatrix('Training set', a, n, m)
      do j = 1, n
        conval(j) = nint(j / 2.0d0)
      end do
      call mlwcolvec('Constituent values', conval, n)
c
      end
