Example #1
0
def helmert_inverse(n):

    #*****************************************************************************80
    #
    ## HELMERT_INVERSE returns the inverse of the HELMERT matrix.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    26 March 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    #  Parameters:
    #
    #    Input, integer N, the order of A.
    #
    #    Output, real A(N,N), the inverse matrix.
    #
    import numpy as np

    a = helmert(n)

    a = np.transpose(a)

    return a
Example #2
0
def helmert_inverse ( n ):

#*****************************************************************************80
#
## HELMERT_INVERSE returns the inverse of the HELMERT matrix.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    26 March 2015
#
#  Author:
#
#    John Burkardt
#
#  Parameters:
#
#    Input, integer N, the order of A.
#
#    Output, real A(N,N), the inverse matrix.
#
  import numpy as np

  a = helmert ( n )

  a = np.transpose ( a )

  return a
Example #3
0
def helmert_determinant_test():

    #*****************************************************************************80
    #
    ## HELMERT_DETERMINANT_TEST tests HELMERT_DETERMINANT.
    #
    #  Licensing:
    #
    #    This code is distributed under the GNU LGPL license.
    #
    #  Modified:
    #
    #    11 February 2015
    #
    #  Author:
    #
    #    John Burkardt
    #
    from helmert import helmert
    from r8mat_print import r8mat_print

    print ''
    print 'HELMERT_DETERMINANT_TEST'
    print '  HELMERT_DETERMINANT computes the HELMERT determinant.'

    m = 5
    n = m

    a = helmert(n)

    r8mat_print(m, n, a, '  HELMERT matrix:')

    value = helmert_determinant(n)

    print ''
    print '  Value =  %g' % (value)

    print ''
    print 'HELMERT_DETERMINANT_TEST'
    print '  Normal end of execution.'

    return
Example #4
0
def helmert_determinant_test ( ):

#*****************************************************************************80
#
## HELMERT_DETERMINANT_TEST tests HELMERT_DETERMINANT.
#
#  Licensing:
#
#    This code is distributed under the GNU LGPL license.
#
#  Modified:
#
#    11 February 2015
#
#  Author:
#
#    John Burkardt
#
  from helmert import helmert
  from r8mat_print import r8mat_print

  print ''
  print 'HELMERT_DETERMINANT_TEST'
  print '  HELMERT_DETERMINANT computes the HELMERT determinant.'

  m = 5
  n = m
 
  a = helmert ( n )

  r8mat_print ( m, n, a, '  HELMERT matrix:' )

  value = helmert_determinant ( n )

  print ''
  print '  Value =  %g' % ( value )

  print ''
  print 'HELMERT_DETERMINANT_TEST'
  print '  Normal end of execution.'

  return