% Regression test function (black blox) for FreeMat v3.5
% This function is autogenerated by helpgen.
function bbtest_success = bbtest_subplot
  bbtest_success = 1;
NumErrors = 0;
try
  t = linspace(-pi,pi);

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,1)

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,2);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t*2).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,3);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t*3).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,4);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t*4).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  mprint subplot1

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  t = linspace(-pi,pi);

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,[1,2])

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,3);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t*3).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,4);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,cos(t*4).*exp(-2*t));

catch
  NumErrors = NumErrors + 1;
end
try
  mprint subplot2

catch
  NumErrors = NumErrors + 1;
end
if (NumErrors ~= 0) bbtest_success = 0; return; end
NumErrors = 0;
try
  t=0:(2*pi/100):(2*pi);

catch
  NumErrors = NumErrors + 1;
end
try
  x=cos(t*2).*(2+sin(t*3)*.3);

catch
  NumErrors = NumErrors + 1;
end
try
  y=sin(t*2).*(2+sin(t*3)*.3);

catch
  NumErrors = NumErrors + 1;
end
try
  z=cos(t*3)*.3;

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,1)

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,x);

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,2);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,y);

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,3);

catch
  NumErrors = NumErrors + 1;
end
try
  plot(t,z);

catch
  NumErrors = NumErrors + 1;
end
try
  subplot(2,2,4);

catch
  NumErrors = NumErrors + 1;
end
try
  tubeplot(x,y,z,0.14*sin(t*5)+.29,t,10)

catch
  NumErrors = NumErrors + 1;
end
try
  axis equal

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

catch
  NumErrors = NumErrors + 1;
end
try
  mprint subplot3

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