% Regression test function (black blox) for FreeMat v3.5
% This function is autogenerated by helpgen.
function bbtest_success = bbtest_surf
  bbtest_success = 1;
NumErrors = 0;
try
  x = repmat(linspace(-1,1),[100,1]);

catch
  NumErrors = NumErrors + 1;
end
try
  y = x';

catch
  NumErrors = NumErrors + 1;
end
try
  r = x.^2+y.^2;

catch
  NumErrors = NumErrors + 1;
end
try
  z = exp(-r*3).*cos(5*r);

catch
  NumErrors = NumErrors + 1;
end
try
  c = r;

catch
  NumErrors = NumErrors + 1;
end
try
  surf(x,y,z,c)

catch
  NumErrors = NumErrors + 1;
end
try
  axis equal

catch
  NumErrors = NumErrors + 1;
end
try
  view(3)

catch
  NumErrors = NumErrors + 1;
end
try
  mprint surf1

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  surf(x,y,z)

catch
  NumErrors = NumErrors + 1;
end
try
  axis equal

catch
  NumErrors = NumErrors + 1;
end
try
  view(3)

catch
  NumErrors = NumErrors + 1;
end
try
  mprint surf2

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