% Regression test function (black blox) for FreeMat v3.6
% This function is autogenerated by helpgen.
function bbtest_success = bbtest_interplin1
  bbtest_success = 1;
NumErrors = 0;
try
  x = linspace(-pi*7/8,pi*7/8,15);

catch
  NumErrors = NumErrors + 1;
end
try
  y = cos(x);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(x,y,'ro');

catch
  NumErrors = NumErrors + 1;
end
try
  mprint interplin1_1

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  xi = linspace(-4,4,100);

catch
  NumErrors = NumErrors + 1;
end
try
  yi_nan = interplin1(x,y,xi,'nan');

catch
  NumErrors = NumErrors + 1;
end
try
  yi_zero = interplin1(x,y,xi,'zero');

catch
  NumErrors = NumErrors + 1;
end
try
  yi_endpoint = interplin1(x,y,xi,'endpoint');

catch
  NumErrors = NumErrors + 1;
end
try
  yi_extrap = interplin1(x,y,xi,'extrap');

catch
  NumErrors = NumErrors + 1;
end
try
  plot(x,y,'ro',xi,yi_nan,'g-x',xi,yi_zero,'g-x',xi,yi_endpoint,'g-x',xi,yi_extrap,'g-x');

catch
  NumErrors = NumErrors + 1;
end
try
  mprint interplin1_2

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
