#*****************************************************************************80 # ## bilinear_test tests bilinear. # # Licensing: # # Copyright 2016 James P. Howard, II # # The computer code and data files on this web page are distributed under # https://opensource.org/licenses/BSD-2-Clause, the BSD-2-Clause license. # # Modified: # # 27 February 2020 # # Author: # # John Burkardt # cat ( date ( ), "\n" ) cat ( "\n" ) cat ( "bilinear_test\n" ) cat ( " ", version$version.string, "\n" ) cat ( " bilinear computes the intercept and slope of the line through two points.\n" ) source ( "/home/burkardt/public_html/r_src/bilinear/bilinear.R" ) cat ( "\n" ) x <- c ( 4, 7 ) cat ( "\n" ) cat ( " x:\n" ) cat ( "\n" ) print ( x ) y <- c ( 2, 4 ) cat ( "\n" ) cat ( " y:\n" ) cat ( "\n" ) print ( y ) z <- matrix ( c ( 28, 31, 34, 35 ), nrow = 2 ) cat ( "\n" ) cat ( " z:\n" ) cat ( "\n" ) print ( z ) xnew <- c ( 2.5, 3.0, 3.5 ) cat ( "\n" ) cat ( " xnew:\n" ) cat ( "\n" ) print ( xnew ) ynew <- c ( 5.0, 5.5, 6.0 ) cat ( "\n" ) cat ( " ynew:\n" ) cat ( "\n" ) print ( ynew ) znew <- bilinear ( x, y, z, xnew, ynew ) cat ( "\n" ) cat ( " znew <- bilinear ( x, y, z, xnew, ynew )\n" ) cat ( "\n" ) print ( znew ) # # Terminate. # cat ( "\n" ) cat ( "bilinear_test\n" ) cat ( " Normal end of execution.\n" ) cat ( date ( ), "\n" ) quit ( )