%This code demonstrates a two-dimensional approximation of the function f(x1,x2)=log(x1)+log(x2) using the
%bilinear.m code.  Written by Philip Shaw, Fordham University, 2018. 
x1=2.1; %point in x1 to approximate f(x1,x2)
x2=2.05; %point in x2 to approximate f(x1,x2)
fxtrue=myfunps2([x1 x2]) %known value for f(x1,x2)
x1i=2.099; %point to the left of x1
x2j=2.0499; %point to the left of x2
x1i1=2.11; %point to the right of x1
x2j1=2.051; %point to the right of x2
[fx1x2]=bilinear(@(x)myfunps2(x),x1i,x1i1,x2j,x2j1,x1,x2)
display('Approximate Value for f(x1,x2)')
fx1x2
display('True Value for f(x1,x2)')
fxtrue
